Blame SOURCES/glibc-rh1505492-prototypes-14.patch

25845f
commit a72ddc1424d5bfcab14d90f1149cbb9b492f0120
25845f
Author: Joseph Myers <joseph@codesourcery.com>
25845f
Date:   Tue Oct 20 11:51:03 2015 +0000
25845f
25845f
    Convert 24 more function definitions to prototype style (array parameters).
25845f
    
25845f
    This automatically-generated patch converts 24 function definitions in
25845f
    glibc from old-style K&R to prototype-style.  Following my other
25845f
    recent such patches, this one deals with the case of functions with
25845f
    array parameters.
25845f
    
25845f
    Tested for x86_64 and x86 (testsuite, and that installed stripped
25845f
    shared libraries are unchanged by the patch).
25845f
    
25845f
            * crypt/cert.c (main): Convert to prototype-style function
25845f
            definition.
25845f
            * io/pipe.c (__pipe): Likewise.
25845f
            * io/pipe2.c (__pipe2): Likewise.
25845f
            * misc/futimesat.c (futimesat): Likewise.
25845f
            * misc/utimes.c (__utimes): Likewise.
25845f
            * posix/execve.c (__execve): Likewise.
25845f
            * posix/execvp.c (execvp): Likewise.
25845f
            * posix/execvpe.c (__execvpe): Likewise.
25845f
            * posix/fexecve.c (fexecve): Likewise.
25845f
            * socket/socketpair.c (socketpair): Likewise.
25845f
            * stdlib/drand48-iter.c (__drand48_iterate): Likewise.
25845f
            * stdlib/erand48.c (erand48): Likewise.
25845f
            * stdlib/erand48_r.c (__erand48_r): Likewise.
25845f
            * stdlib/jrand48.c (jrand48): Likewise.
25845f
            * stdlib/jrand48_r.c (__jrand48_r): Likewise.
25845f
            * stdlib/lcong48.c (lcong48): Likewise.
25845f
            * stdlib/lcong48_r.c (__lcong48_r): Likewise.
25845f
            * stdlib/nrand48.c (nrand48): Likewise.
25845f
            * stdlib/nrand48_r.c (__nrand48_r): Likewise.
25845f
            * stdlib/seed48.c (seed48): Likewise.
25845f
            * stdlib/seed48_r.c (__seed48_r): Likewise.
25845f
            * sysdeps/mach/hurd/execve.c (__execve): Likewise.
25845f
            * sysdeps/mach/hurd/utimes.c (__utimes): Likewise.
25845f
            * sysdeps/unix/sysv/linux/fexecve.c (fexecve): Likewise.
25845f
25845f
diff --git a/crypt/cert.c b/crypt/cert.c
25845f
index d651108860f0052a..80029e9078c1cdc0 100644
25845f
--- a/crypt/cert.c
25845f
+++ b/crypt/cert.c
25845f
@@ -30,9 +30,7 @@ good_bye (void)
25845f
 }
25845f
 
25845f
 int
25845f
-main(argc, argv)
25845f
-     int argc;
25845f
-     char *argv[];
25845f
+main (int argc, char *argv[])
25845f
 {
25845f
 	char key[64],plain[64],cipher[64],answer[64];
25845f
 	int i;
25845f
diff --git a/io/pipe.c b/io/pipe.c
25845f
index 1f1c03f0d5b44fe6..2223ac169c2b9d95 100644
25845f
--- a/io/pipe.c
25845f
+++ b/io/pipe.c
25845f
@@ -24,8 +24,7 @@
25845f
    bytes written on PIPEDES[1] can be read from PIPEDES[0].
25845f
    Returns 0 if successful, -1 if not.  */
25845f
 int
25845f
-__pipe (__pipedes)
25845f
-     int __pipedes[2];
25845f
+__pipe (int __pipedes[2])
25845f
 {
25845f
   if (__pipedes == NULL)
25845f
     {
25845f
diff --git a/io/pipe2.c b/io/pipe2.c
25845f
index 2478fc3c6128c981..9bfc8291330f899b 100644
25845f
--- a/io/pipe2.c
25845f
+++ b/io/pipe2.c
25845f
@@ -24,9 +24,7 @@
25845f
    PIPEDES[1] can be read from PIPEDES[0].  Apply FLAGS to the new
25845f
    file descriptors.  Returns 0 if successful, -1 if not.  */
25845f
 int
25845f
-__pipe2 (pipedes, flags)
25845f
-     int pipedes[2];
25845f
-     int flags;
25845f
+__pipe2 (int pipedes[2], int flags)
25845f
 {
25845f
   if (pipedes == NULL)
25845f
     {
25845f
diff --git a/misc/futimesat.c b/misc/futimesat.c
25845f
index b33939e0a1cf4b88..b428852aeb9a2590 100644
25845f
--- a/misc/futimesat.c
25845f
+++ b/misc/futimesat.c
25845f
@@ -24,10 +24,7 @@
25845f
 /* Change the access time of FILE relative to FD to TVP[0] and
25845f
    the modification time of FILE to TVP[1].  */
25845f
 int
25845f
-futimesat (fd, file, tvp)
25845f
-     int fd;
25845f
-     const char *file;
25845f
-     const struct timeval tvp[2];
25845f
+futimesat (int fd, const char *file, const struct timeval tvp[2])
25845f
 {
25845f
   if (fd < 0
25845f
       && (file == NULL
25845f
diff --git a/misc/utimes.c b/misc/utimes.c
25845f
index 5cdfe6ca5e594e42..9c94f6be646bd955 100644
25845f
--- a/misc/utimes.c
25845f
+++ b/misc/utimes.c
25845f
@@ -22,9 +22,7 @@
25845f
 /* Change the access time of FILE to TVP[0] and
25845f
    the modification time of FILE to TVP[1].  */
25845f
 int
25845f
-__utimes (file, tvp)
25845f
-     const char *file;
25845f
-     const struct timeval tvp[2];
25845f
+__utimes (const char *file, const struct timeval tvp[2])
25845f
 {
25845f
   if (file == NULL)
25845f
     {
25845f
diff --git a/posix/execve.c b/posix/execve.c
25845f
index 893cec2b19a39527..27b063fe7d31a59e 100644
25845f
--- a/posix/execve.c
25845f
+++ b/posix/execve.c
25845f
@@ -23,10 +23,7 @@
25845f
 /* Replace the current process, executing PATH with arguments ARGV and
25845f
    environment ENVP.  ARGV and ENVP are terminated by NULL pointers.  */
25845f
 int
25845f
-__execve (path, argv, envp)
25845f
-     const char *path;
25845f
-     char *const argv[];
25845f
-     char *const envp[];
25845f
+__execve (const char *path, char *const argv[], char *const envp[])
25845f
 {
25845f
   if (path == NULL || argv == NULL || envp == NULL)
25845f
     {
25845f
diff --git a/posix/execvp.c b/posix/execvp.c
25845f
index 5f2e155cd55db43e..9140b93d27896d26 100644
25845f
--- a/posix/execvp.c
25845f
+++ b/posix/execvp.c
25845f
@@ -22,9 +22,7 @@
25845f
 /* Execute FILE, searching in the `PATH' environment variable if it contains
25845f
    no slashes, with arguments ARGV and environment from `environ'.  */
25845f
 int
25845f
-execvp (file, argv)
25845f
-     const char *file;
25845f
-     char *const argv[];
25845f
+execvp (const char *file, char *const argv[])
25845f
 {
25845f
   return __execvpe (file, argv, __environ);
25845f
 }
25845f
diff --git a/posix/execvpe.c b/posix/execvpe.c
25845f
index 48f777a9d57928fb..b607235c8bc27026 100644
25845f
--- a/posix/execvpe.c
25845f
+++ b/posix/execvpe.c
25845f
@@ -46,10 +46,7 @@ scripts_argv (const char *file, char *const argv[], int argc, char **new_argv)
25845f
 /* Execute FILE, searching in the `PATH' environment variable if it contains
25845f
    no slashes, with arguments ARGV and environment from ENVP.  */
25845f
 int
25845f
-__execvpe (file, argv, envp)
25845f
-     const char *file;
25845f
-     char *const argv[];
25845f
-     char *const envp[];
25845f
+__execvpe (const char *file, char *const argv[], char *const envp[])
25845f
 {
25845f
   if (*file == '\0')
25845f
     {
25845f
diff --git a/posix/fexecve.c b/posix/fexecve.c
25845f
index 6a22a194e34d0789..1ebbbc6fe942e716 100644
25845f
--- a/posix/fexecve.c
25845f
+++ b/posix/fexecve.c
25845f
@@ -23,10 +23,7 @@
25845f
 /* Execute the file FD refers to, overlaying the running program image.
25845f
    ARGV and ENVP are passed to the new program, as for `execve'.  */
25845f
 int
25845f
-fexecve (fd, argv, envp)
25845f
-     int fd;
25845f
-     char *const argv[];
25845f
-     char *const envp[];
25845f
+fexecve (int fd, char *const argv[], char *const envp[])
25845f
 {
25845f
   if (fd < 0 || argv == NULL || envp == NULL)
25845f
     {
25845f
diff --git a/socket/socketpair.c b/socket/socketpair.c
25845f
index 031674831f88cd61..4da27fb3b616d26f 100644
25845f
--- a/socket/socketpair.c
25845f
+++ b/socket/socketpair.c
25845f
@@ -23,11 +23,7 @@
25845f
    descriptors for them in FDS[0] and FDS[1].  If PROTOCOL is zero,
25845f
    one will be chosen automatically.  Returns 0 on success, -1 for errors.  */
25845f
 int
25845f
-socketpair (domain, type, protocol, fds)
25845f
-     int domain;
25845f
-     int type;
25845f
-     int protocol;
25845f
-     int fds[2];
25845f
+socketpair (int domain, int type, int protocol, int fds[2])
25845f
 {
25845f
   __set_errno (ENOSYS);
25845f
   return -1;
25845f
diff --git a/stdlib/drand48-iter.c b/stdlib/drand48-iter.c
25845f
index 9270aab068170970..0cb988028f25a405 100644
25845f
--- a/stdlib/drand48-iter.c
25845f
+++ b/stdlib/drand48-iter.c
25845f
@@ -27,9 +27,7 @@ struct drand48_data __libc_drand48_data;
25845f
 
25845f
 
25845f
 int
25845f
-__drand48_iterate (xsubi, buffer)
25845f
-     unsigned short int xsubi[3];
25845f
-     struct drand48_data *buffer;
25845f
+__drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer)
25845f
 {
25845f
   uint64_t X;
25845f
   uint64_t result;
25845f
diff --git a/stdlib/erand48.c b/stdlib/erand48.c
25845f
index d2cf5af967b6663e..ff128ab72bb43e05 100644
25845f
--- a/stdlib/erand48.c
25845f
+++ b/stdlib/erand48.c
25845f
@@ -20,8 +20,7 @@
25845f
 
25845f
 
25845f
 double
25845f
-erand48 (xsubi)
25845f
-     unsigned short int xsubi[3];
25845f
+erand48 (unsigned short int xsubi[3])
25845f
 {
25845f
   double result;
25845f
 
25845f
diff --git a/stdlib/erand48_r.c b/stdlib/erand48_r.c
25845f
index cdd02c9c963c89ed..9cf062da0ad1b89c 100644
25845f
--- a/stdlib/erand48_r.c
25845f
+++ b/stdlib/erand48_r.c
25845f
@@ -22,10 +22,8 @@
25845f
 
25845f
 
25845f
 int
25845f
-__erand48_r (xsubi, buffer, result)
25845f
-     unsigned short int xsubi[3];
25845f
-     struct drand48_data *buffer;
25845f
-     double *result;
25845f
+__erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
25845f
+	     double *result)
25845f
 {
25845f
   union ieee754_double temp;
25845f
 
25845f
diff --git a/stdlib/jrand48.c b/stdlib/jrand48.c
25845f
index af6bf6809155963c..a6d2f3ab0a1e0c9d 100644
25845f
--- a/stdlib/jrand48.c
25845f
+++ b/stdlib/jrand48.c
25845f
@@ -20,8 +20,7 @@
25845f
 
25845f
 
25845f
 long int
25845f
-jrand48 (xsubi)
25845f
-     unsigned short int xsubi[3];
25845f
+jrand48 (unsigned short int xsubi[3])
25845f
 {
25845f
   long int result;
25845f
 
25845f
diff --git a/stdlib/jrand48_r.c b/stdlib/jrand48_r.c
25845f
index 78c57dbaa285f968..b0170e11d30fcf5e 100644
25845f
--- a/stdlib/jrand48_r.c
25845f
+++ b/stdlib/jrand48_r.c
25845f
@@ -19,10 +19,8 @@
25845f
 #include <stdlib.h>
25845f
 
25845f
 int
25845f
-__jrand48_r (xsubi, buffer, result)
25845f
-     unsigned short int xsubi[3];
25845f
-     struct drand48_data *buffer;
25845f
-     long int *result;
25845f
+__jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
25845f
+	     long int *result)
25845f
 {
25845f
   /* Compute next state.  */
25845f
   if (__drand48_iterate (xsubi, buffer) < 0)
25845f
diff --git a/stdlib/lcong48.c b/stdlib/lcong48.c
25845f
index 31f403e01c10f104..b7943605041e99c0 100644
25845f
--- a/stdlib/lcong48.c
25845f
+++ b/stdlib/lcong48.c
25845f
@@ -20,8 +20,7 @@
25845f
 
25845f
 
25845f
 void
25845f
-lcong48 (param)
25845f
-     unsigned short int param[7];
25845f
+lcong48 (unsigned short int param[7])
25845f
 {
25845f
   (void) __lcong48_r (param, &__libc_drand48_data);
25845f
 }
25845f
diff --git a/stdlib/lcong48_r.c b/stdlib/lcong48_r.c
25845f
index 03ffcd7eb03742de..063baa3c8753a6f9 100644
25845f
--- a/stdlib/lcong48_r.c
25845f
+++ b/stdlib/lcong48_r.c
25845f
@@ -22,9 +22,7 @@
25845f
 #include <limits.h>
25845f
 
25845f
 int
25845f
-__lcong48_r (param, buffer)
25845f
-     unsigned short int param[7];
25845f
-     struct drand48_data *buffer;
25845f
+__lcong48_r (unsigned short int param[7], struct drand48_data *buffer)
25845f
 {
25845f
   /* Store the given values.  */
25845f
   memcpy (buffer->__x, &param[0], sizeof (buffer->__x));
25845f
diff --git a/stdlib/nrand48.c b/stdlib/nrand48.c
25845f
index 927e7d25534292a0..9f9f2f550faf3d88 100644
25845f
--- a/stdlib/nrand48.c
25845f
+++ b/stdlib/nrand48.c
25845f
@@ -20,8 +20,7 @@
25845f
 
25845f
 
25845f
 long int
25845f
-nrand48 (xsubi)
25845f
-     unsigned short int xsubi[3];
25845f
+nrand48 (unsigned short int xsubi[3])
25845f
 {
25845f
   long int result;
25845f
 
25845f
diff --git a/stdlib/nrand48_r.c b/stdlib/nrand48_r.c
25845f
index 15a9b0c20589198a..f57e34cdcc44ff9f 100644
25845f
--- a/stdlib/nrand48_r.c
25845f
+++ b/stdlib/nrand48_r.c
25845f
@@ -19,10 +19,8 @@
25845f
 #include <stdlib.h>
25845f
 
25845f
 int
25845f
-__nrand48_r (xsubi, buffer, result)
25845f
-     unsigned short int xsubi[3];
25845f
-     struct drand48_data *buffer;
25845f
-     long int *result;
25845f
+__nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
25845f
+	     long int *result)
25845f
 {
25845f
   /* Compute next state.  */
25845f
   if (__drand48_iterate (xsubi, buffer) < 0)
25845f
diff --git a/stdlib/seed48.c b/stdlib/seed48.c
25845f
index 9808213eaeff876d..941c870977062bb3 100644
25845f
--- a/stdlib/seed48.c
25845f
+++ b/stdlib/seed48.c
25845f
@@ -20,8 +20,7 @@
25845f
 
25845f
 
25845f
 unsigned short int *
25845f
-seed48 (seed16v)
25845f
-     unsigned short int seed16v[3];
25845f
+seed48 (unsigned short int seed16v[3])
25845f
 {
25845f
   (void) __seed48_r (seed16v, &__libc_drand48_data);
25845f
 
25845f
diff --git a/stdlib/seed48_r.c b/stdlib/seed48_r.c
25845f
index b821d2349d8bb0c1..c8d9262123200c1b 100644
25845f
--- a/stdlib/seed48_r.c
25845f
+++ b/stdlib/seed48_r.c
25845f
@@ -21,9 +21,7 @@
25845f
 #include <limits.h>
25845f
 
25845f
 int
25845f
-__seed48_r (seed16v, buffer)
25845f
-     unsigned short int seed16v[3];
25845f
-     struct drand48_data *buffer;
25845f
+__seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer)
25845f
 {
25845f
   /* Save old value at a private place to be used as return value.  */
25845f
   memcpy (buffer->__old_x, buffer->__x, sizeof (buffer->__x));
25845f
diff --git a/sysdeps/mach/hurd/execve.c b/sysdeps/mach/hurd/execve.c
25845f
index 716cea7bf8fd0eba..72e509b7870085d0 100644
25845f
--- a/sysdeps/mach/hurd/execve.c
25845f
+++ b/sysdeps/mach/hurd/execve.c
25845f
@@ -22,10 +22,7 @@
25845f
 /* Replace the current process, executing FILE_NAME with arguments ARGV and
25845f
    environment ENVP.  ARGV and ENVP are terminated by NULL pointers.  */
25845f
 int
25845f
-__execve (file_name, argv, envp)
25845f
-     const char *file_name;
25845f
-     char *const argv[];
25845f
-     char *const envp[];
25845f
+__execve (const char *file_name, char *const argv[], char *const envp[])
25845f
 {
25845f
   error_t err;
25845f
   file_t file = __file_name_lookup (file_name, O_EXEC, 0);
25845f
diff --git a/sysdeps/mach/hurd/utimes.c b/sysdeps/mach/hurd/utimes.c
25845f
index ae3d375b2dfb3c72..d915fae5bfee9e6e 100644
25845f
--- a/sysdeps/mach/hurd/utimes.c
25845f
+++ b/sysdeps/mach/hurd/utimes.c
25845f
@@ -24,9 +24,7 @@
25845f
 /* Change the access time of FILE to TVP[0] and
25845f
    the modification time of FILE to TVP[1].  */
25845f
 int
25845f
-__utimes (file, tvp)
25845f
-     const char *file;
25845f
-     const struct timeval tvp[2];
25845f
+__utimes (const char *file, const struct timeval tvp[2])
25845f
 {
25845f
   union tv
25845f
   {
25845f
diff --git a/sysdeps/unix/sysv/linux/fexecve.c b/sysdeps/unix/sysv/linux/fexecve.c
25845f
index 032e680742507e70..df341cde0a3ea21b 100644
25845f
--- a/sysdeps/unix/sysv/linux/fexecve.c
25845f
+++ b/sysdeps/unix/sysv/linux/fexecve.c
25845f
@@ -25,10 +25,7 @@
25845f
 /* Execute the file FD refers to, overlaying the running program image.
25845f
    ARGV and ENVP are passed to the new program, as for `execve'.  */
25845f
 int
25845f
-fexecve (fd, argv, envp)
25845f
-     int fd;
25845f
-     char *const argv[];
25845f
-     char *const envp[];
25845f
+fexecve (int fd, char *const argv[], char *const envp[])
25845f
 {
25845f
   if (fd < 0 || argv == NULL || envp == NULL)
25845f
     {