mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Convert 24 more function definitions to prototype style (array parameters).
This automatically-generated patch converts 24 function definitions in glibc from old-style K&R to prototype-style. Following my other recent such patches, this one deals with the case of functions with array parameters. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). * crypt/cert.c (main): Convert to prototype-style function definition. * io/pipe.c (__pipe): Likewise. * io/pipe2.c (__pipe2): Likewise. * misc/futimesat.c (futimesat): Likewise. * misc/utimes.c (__utimes): Likewise. * posix/execve.c (__execve): Likewise. * posix/execvp.c (execvp): Likewise. * posix/execvpe.c (__execvpe): Likewise. * posix/fexecve.c (fexecve): Likewise. * socket/socketpair.c (socketpair): Likewise. * stdlib/drand48-iter.c (__drand48_iterate): Likewise. * stdlib/erand48.c (erand48): Likewise. * stdlib/erand48_r.c (__erand48_r): Likewise. * stdlib/jrand48.c (jrand48): Likewise. * stdlib/jrand48_r.c (__jrand48_r): Likewise. * stdlib/lcong48.c (lcong48): Likewise. * stdlib/lcong48_r.c (__lcong48_r): Likewise. * stdlib/nrand48.c (nrand48): Likewise. * stdlib/nrand48_r.c (__nrand48_r): Likewise. * stdlib/seed48.c (seed48): Likewise. * stdlib/seed48_r.c (__seed48_r): Likewise. * sysdeps/mach/hurd/execve.c (__execve): Likewise. * sysdeps/mach/hurd/utimes.c (__utimes): Likewise. * sysdeps/unix/sysv/linux/fexecve.c (fexecve): Likewise.
This commit is contained in:
28
ChangeLog
28
ChangeLog
@ -1,3 +1,31 @@
|
|||||||
|
2015-10-20 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* crypt/cert.c (main): Convert to prototype-style function
|
||||||
|
definition.
|
||||||
|
* io/pipe.c (__pipe): Likewise.
|
||||||
|
* io/pipe2.c (__pipe2): Likewise.
|
||||||
|
* misc/futimesat.c (futimesat): Likewise.
|
||||||
|
* misc/utimes.c (__utimes): Likewise.
|
||||||
|
* posix/execve.c (__execve): Likewise.
|
||||||
|
* posix/execvp.c (execvp): Likewise.
|
||||||
|
* posix/execvpe.c (__execvpe): Likewise.
|
||||||
|
* posix/fexecve.c (fexecve): Likewise.
|
||||||
|
* socket/socketpair.c (socketpair): Likewise.
|
||||||
|
* stdlib/drand48-iter.c (__drand48_iterate): Likewise.
|
||||||
|
* stdlib/erand48.c (erand48): Likewise.
|
||||||
|
* stdlib/erand48_r.c (__erand48_r): Likewise.
|
||||||
|
* stdlib/jrand48.c (jrand48): Likewise.
|
||||||
|
* stdlib/jrand48_r.c (__jrand48_r): Likewise.
|
||||||
|
* stdlib/lcong48.c (lcong48): Likewise.
|
||||||
|
* stdlib/lcong48_r.c (__lcong48_r): Likewise.
|
||||||
|
* stdlib/nrand48.c (nrand48): Likewise.
|
||||||
|
* stdlib/nrand48_r.c (__nrand48_r): Likewise.
|
||||||
|
* stdlib/seed48.c (seed48): Likewise.
|
||||||
|
* stdlib/seed48_r.c (__seed48_r): Likewise.
|
||||||
|
* sysdeps/mach/hurd/execve.c (__execve): Likewise.
|
||||||
|
* sysdeps/mach/hurd/utimes.c (__utimes): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/fexecve.c (fexecve): Likewise.
|
||||||
|
|
||||||
2015-10-19 Joseph Myers <joseph@codesourcery.com>
|
2015-10-19 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* configure.ac (libc_cv_asm_unique_object): Remove configure test.
|
* configure.ac (libc_cv_asm_unique_object): Remove configure test.
|
||||||
|
@ -30,9 +30,7 @@ good_bye (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(argc, argv)
|
main (int argc, char *argv[])
|
||||||
int argc;
|
|
||||||
char *argv[];
|
|
||||||
{
|
{
|
||||||
char key[64],plain[64],cipher[64],answer[64];
|
char key[64],plain[64],cipher[64],answer[64];
|
||||||
int i;
|
int i;
|
||||||
|
@ -24,8 +24,7 @@
|
|||||||
bytes written on PIPEDES[1] can be read from PIPEDES[0].
|
bytes written on PIPEDES[1] can be read from PIPEDES[0].
|
||||||
Returns 0 if successful, -1 if not. */
|
Returns 0 if successful, -1 if not. */
|
||||||
int
|
int
|
||||||
__pipe (__pipedes)
|
__pipe (int __pipedes[2])
|
||||||
int __pipedes[2];
|
|
||||||
{
|
{
|
||||||
if (__pipedes == NULL)
|
if (__pipedes == NULL)
|
||||||
{
|
{
|
||||||
|
@ -24,9 +24,7 @@
|
|||||||
PIPEDES[1] can be read from PIPEDES[0]. Apply FLAGS to the new
|
PIPEDES[1] can be read from PIPEDES[0]. Apply FLAGS to the new
|
||||||
file descriptors. Returns 0 if successful, -1 if not. */
|
file descriptors. Returns 0 if successful, -1 if not. */
|
||||||
int
|
int
|
||||||
__pipe2 (pipedes, flags)
|
__pipe2 (int pipedes[2], int flags)
|
||||||
int pipedes[2];
|
|
||||||
int flags;
|
|
||||||
{
|
{
|
||||||
if (pipedes == NULL)
|
if (pipedes == NULL)
|
||||||
{
|
{
|
||||||
|
@ -24,10 +24,7 @@
|
|||||||
/* Change the access time of FILE relative to FD to TVP[0] and
|
/* Change the access time of FILE relative to FD to TVP[0] and
|
||||||
the modification time of FILE to TVP[1]. */
|
the modification time of FILE to TVP[1]. */
|
||||||
int
|
int
|
||||||
futimesat (fd, file, tvp)
|
futimesat (int fd, const char *file, const struct timeval tvp[2])
|
||||||
int fd;
|
|
||||||
const char *file;
|
|
||||||
const struct timeval tvp[2];
|
|
||||||
{
|
{
|
||||||
if (fd < 0
|
if (fd < 0
|
||||||
&& (file == NULL
|
&& (file == NULL
|
||||||
|
@ -22,9 +22,7 @@
|
|||||||
/* Change the access time of FILE to TVP[0] and
|
/* Change the access time of FILE to TVP[0] and
|
||||||
the modification time of FILE to TVP[1]. */
|
the modification time of FILE to TVP[1]. */
|
||||||
int
|
int
|
||||||
__utimes (file, tvp)
|
__utimes (const char *file, const struct timeval tvp[2])
|
||||||
const char *file;
|
|
||||||
const struct timeval tvp[2];
|
|
||||||
{
|
{
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
{
|
{
|
||||||
|
@ -23,10 +23,7 @@
|
|||||||
/* Replace the current process, executing PATH with arguments ARGV and
|
/* Replace the current process, executing PATH with arguments ARGV and
|
||||||
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
|
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
|
||||||
int
|
int
|
||||||
__execve (path, argv, envp)
|
__execve (const char *path, char *const argv[], char *const envp[])
|
||||||
const char *path;
|
|
||||||
char *const argv[];
|
|
||||||
char *const envp[];
|
|
||||||
{
|
{
|
||||||
if (path == NULL || argv == NULL || envp == NULL)
|
if (path == NULL || argv == NULL || envp == NULL)
|
||||||
{
|
{
|
||||||
|
@ -21,9 +21,7 @@
|
|||||||
/* Execute FILE, searching in the `PATH' environment variable if it contains
|
/* Execute FILE, searching in the `PATH' environment variable if it contains
|
||||||
no slashes, with arguments ARGV and environment from `environ'. */
|
no slashes, with arguments ARGV and environment from `environ'. */
|
||||||
int
|
int
|
||||||
execvp (file, argv)
|
execvp (const char *file, char *const argv[])
|
||||||
const char *file;
|
|
||||||
char *const argv[];
|
|
||||||
{
|
{
|
||||||
return __execvpe (file, argv, __environ);
|
return __execvpe (file, argv, __environ);
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,7 @@ scripts_argv (const char *file, char *const argv[], int argc, char **new_argv)
|
|||||||
/* Execute FILE, searching in the `PATH' environment variable if it contains
|
/* Execute FILE, searching in the `PATH' environment variable if it contains
|
||||||
no slashes, with arguments ARGV and environment from ENVP. */
|
no slashes, with arguments ARGV and environment from ENVP. */
|
||||||
int
|
int
|
||||||
__execvpe (file, argv, envp)
|
__execvpe (const char *file, char *const argv[], char *const envp[])
|
||||||
const char *file;
|
|
||||||
char *const argv[];
|
|
||||||
char *const envp[];
|
|
||||||
{
|
{
|
||||||
if (*file == '\0')
|
if (*file == '\0')
|
||||||
{
|
{
|
||||||
|
@ -23,10 +23,7 @@
|
|||||||
/* Execute the file FD refers to, overlaying the running program image.
|
/* Execute the file FD refers to, overlaying the running program image.
|
||||||
ARGV and ENVP are passed to the new program, as for `execve'. */
|
ARGV and ENVP are passed to the new program, as for `execve'. */
|
||||||
int
|
int
|
||||||
fexecve (fd, argv, envp)
|
fexecve (int fd, char *const argv[], char *const envp[])
|
||||||
int fd;
|
|
||||||
char *const argv[];
|
|
||||||
char *const envp[];
|
|
||||||
{
|
{
|
||||||
if (fd < 0 || argv == NULL || envp == NULL)
|
if (fd < 0 || argv == NULL || envp == NULL)
|
||||||
{
|
{
|
||||||
|
@ -23,11 +23,7 @@
|
|||||||
descriptors for them in FDS[0] and FDS[1]. If PROTOCOL is zero,
|
descriptors for them in FDS[0] and FDS[1]. If PROTOCOL is zero,
|
||||||
one will be chosen automatically. Returns 0 on success, -1 for errors. */
|
one will be chosen automatically. Returns 0 on success, -1 for errors. */
|
||||||
int
|
int
|
||||||
socketpair (domain, type, protocol, fds)
|
socketpair (int domain, int type, int protocol, int fds[2])
|
||||||
int domain;
|
|
||||||
int type;
|
|
||||||
int protocol;
|
|
||||||
int fds[2];
|
|
||||||
{
|
{
|
||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -27,9 +27,7 @@ struct drand48_data __libc_drand48_data;
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__drand48_iterate (xsubi, buffer)
|
__drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer)
|
||||||
unsigned short int xsubi[3];
|
|
||||||
struct drand48_data *buffer;
|
|
||||||
{
|
{
|
||||||
uint64_t X;
|
uint64_t X;
|
||||||
uint64_t result;
|
uint64_t result;
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
double
|
double
|
||||||
erand48 (xsubi)
|
erand48 (unsigned short int xsubi[3])
|
||||||
unsigned short int xsubi[3];
|
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
|
|
||||||
|
@ -22,10 +22,8 @@
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__erand48_r (xsubi, buffer, result)
|
__erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
|
||||||
unsigned short int xsubi[3];
|
double *result)
|
||||||
struct drand48_data *buffer;
|
|
||||||
double *result;
|
|
||||||
{
|
{
|
||||||
union ieee754_double temp;
|
union ieee754_double temp;
|
||||||
|
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
long int
|
long int
|
||||||
jrand48 (xsubi)
|
jrand48 (unsigned short int xsubi[3])
|
||||||
unsigned short int xsubi[3];
|
|
||||||
{
|
{
|
||||||
long int result;
|
long int result;
|
||||||
|
|
||||||
|
@ -19,10 +19,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
__jrand48_r (xsubi, buffer, result)
|
__jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
|
||||||
unsigned short int xsubi[3];
|
long int *result)
|
||||||
struct drand48_data *buffer;
|
|
||||||
long int *result;
|
|
||||||
{
|
{
|
||||||
/* Compute next state. */
|
/* Compute next state. */
|
||||||
if (__drand48_iterate (xsubi, buffer) < 0)
|
if (__drand48_iterate (xsubi, buffer) < 0)
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
lcong48 (param)
|
lcong48 (unsigned short int param[7])
|
||||||
unsigned short int param[7];
|
|
||||||
{
|
{
|
||||||
(void) __lcong48_r (param, &__libc_drand48_data);
|
(void) __lcong48_r (param, &__libc_drand48_data);
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
__lcong48_r (param, buffer)
|
__lcong48_r (unsigned short int param[7], struct drand48_data *buffer)
|
||||||
unsigned short int param[7];
|
|
||||||
struct drand48_data *buffer;
|
|
||||||
{
|
{
|
||||||
/* Store the given values. */
|
/* Store the given values. */
|
||||||
memcpy (buffer->__x, ¶m[0], sizeof (buffer->__x));
|
memcpy (buffer->__x, ¶m[0], sizeof (buffer->__x));
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
long int
|
long int
|
||||||
nrand48 (xsubi)
|
nrand48 (unsigned short int xsubi[3])
|
||||||
unsigned short int xsubi[3];
|
|
||||||
{
|
{
|
||||||
long int result;
|
long int result;
|
||||||
|
|
||||||
|
@ -19,10 +19,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
__nrand48_r (xsubi, buffer, result)
|
__nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
|
||||||
unsigned short int xsubi[3];
|
long int *result)
|
||||||
struct drand48_data *buffer;
|
|
||||||
long int *result;
|
|
||||||
{
|
{
|
||||||
/* Compute next state. */
|
/* Compute next state. */
|
||||||
if (__drand48_iterate (xsubi, buffer) < 0)
|
if (__drand48_iterate (xsubi, buffer) < 0)
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
unsigned short int *
|
unsigned short int *
|
||||||
seed48 (seed16v)
|
seed48 (unsigned short int seed16v[3])
|
||||||
unsigned short int seed16v[3];
|
|
||||||
{
|
{
|
||||||
(void) __seed48_r (seed16v, &__libc_drand48_data);
|
(void) __seed48_r (seed16v, &__libc_drand48_data);
|
||||||
|
|
||||||
|
@ -21,9 +21,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
__seed48_r (seed16v, buffer)
|
__seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer)
|
||||||
unsigned short int seed16v[3];
|
|
||||||
struct drand48_data *buffer;
|
|
||||||
{
|
{
|
||||||
/* Save old value at a private place to be used as return value. */
|
/* Save old value at a private place to be used as return value. */
|
||||||
memcpy (buffer->__old_x, buffer->__x, sizeof (buffer->__x));
|
memcpy (buffer->__old_x, buffer->__x, sizeof (buffer->__x));
|
||||||
|
@ -22,10 +22,7 @@
|
|||||||
/* Replace the current process, executing FILE_NAME with arguments ARGV and
|
/* Replace the current process, executing FILE_NAME with arguments ARGV and
|
||||||
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
|
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
|
||||||
int
|
int
|
||||||
__execve (file_name, argv, envp)
|
__execve (const char *file_name, char *const argv[], char *const envp[])
|
||||||
const char *file_name;
|
|
||||||
char *const argv[];
|
|
||||||
char *const envp[];
|
|
||||||
{
|
{
|
||||||
error_t err;
|
error_t err;
|
||||||
file_t file = __file_name_lookup (file_name, O_EXEC, 0);
|
file_t file = __file_name_lookup (file_name, O_EXEC, 0);
|
||||||
|
@ -23,9 +23,7 @@
|
|||||||
/* Change the access time of FILE to TVP[0] and
|
/* Change the access time of FILE to TVP[0] and
|
||||||
the modification time of FILE to TVP[1]. */
|
the modification time of FILE to TVP[1]. */
|
||||||
int
|
int
|
||||||
__utimes (file, tvp)
|
__utimes (const char *file, const struct timeval tvp[2])
|
||||||
const char *file;
|
|
||||||
const struct timeval tvp[2];
|
|
||||||
{
|
{
|
||||||
union tv
|
union tv
|
||||||
{
|
{
|
||||||
|
@ -25,10 +25,7 @@
|
|||||||
/* Execute the file FD refers to, overlaying the running program image.
|
/* Execute the file FD refers to, overlaying the running program image.
|
||||||
ARGV and ENVP are passed to the new program, as for `execve'. */
|
ARGV and ENVP are passed to the new program, as for `execve'. */
|
||||||
int
|
int
|
||||||
fexecve (fd, argv, envp)
|
fexecve (int fd, char *const argv[], char *const envp[])
|
||||||
int fd;
|
|
||||||
char *const argv[];
|
|
||||||
char *const envp[];
|
|
||||||
{
|
{
|
||||||
if (fd < 0 || argv == NULL || envp == NULL)
|
if (fd < 0 || argv == NULL || envp == NULL)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user