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

00db10
commit 24b9788285effddba3d52f174d483583cf820d19
00db10
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
00db10
Date:   Thu Dec 4 08:45:55 2014 +0530
00db10
00db10
    Fix up function definition style
00db10
    
00db10
    Don't use K&R style for function definitions.
00db10
00db10
Conflicts:
00db10
	libio/fileops.c
00db10
00db10
Due to vtable hardening in glibc-rh1398413.patch.
00db10
00db10
diff --git a/libio/fileops.c b/libio/fileops.c
00db10
index ae56437168efc524..29aec8265a0317f6 100644
00db10
--- a/libio/fileops.c
00db10
+++ b/libio/fileops.c
00db10
@@ -139,8 +139,7 @@ extern struct __gconv_trans_data __libio_translit attribute_hidden;
00db10
 
00db10
 
00db10
 void
00db10
-_IO_new_file_init_internal (fp)
00db10
-     struct _IO_FILE_plus *fp;
00db10
+_IO_new_file_init_internal (struct _IO_FILE_plus *fp)
00db10
 {
00db10
   /* POSIX.1 allows another file handle to be used to change the position
00db10
      of our file descriptor.  Hence we actually don't know the actual
00db10
@@ -162,8 +161,7 @@ _IO_new_file_init (struct _IO_FILE_plus *fp)
00db10
 }
00db10
 
00db10
 int
00db10
-_IO_new_file_close_it (fp)
00db10
-     _IO_FILE *fp;
00db10
+_IO_new_file_close_it (_IO_FILE *fp)
00db10
 {
00db10
   int write_status;
00db10
   if (!_IO_file_is_open (fp))
00db10
@@ -205,9 +203,7 @@ _IO_new_file_close_it (fp)
00db10
 libc_hidden_ver (_IO_new_file_close_it, _IO_file_close_it)
00db10
 
00db10
 void
00db10
-_IO_new_file_finish (fp, dummy)
00db10
-     _IO_FILE *fp;
00db10
-     int dummy;
00db10
+_IO_new_file_finish (_IO_FILE *fp, int dummy)
00db10
 {
00db10
   if (_IO_file_is_open (fp))
00db10
     {
00db10
@@ -220,13 +216,8 @@ _IO_new_file_finish (fp, dummy)
00db10
 libc_hidden_ver (_IO_new_file_finish, _IO_file_finish)
00db10
 
00db10
 _IO_FILE *
00db10
-_IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64)
00db10
-     _IO_FILE *fp;
00db10
-     const char *filename;
00db10
-     int posix_mode;
00db10
-     int prot;
00db10
-     int read_write;
00db10
-     int is32not64;
00db10
+_IO_file_open (_IO_FILE *fp, const char *filename, int posix_mode, int prot,
00db10
+	       int read_write, int is32not64)
00db10
 {
00db10
   int fdesc;
00db10
 #ifdef _LIBC
00db10
@@ -260,11 +251,8 @@ _IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64)
00db10
 libc_hidden_def (_IO_file_open)
00db10
 
00db10
 _IO_FILE *
00db10
-_IO_new_file_fopen (fp, filename, mode, is32not64)
00db10
-     _IO_FILE *fp;
00db10
-     const char *filename;
00db10
-     const char *mode;
00db10
-     int is32not64;
00db10
+_IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode,
00db10
+		    int is32not64)
00db10
 {
00db10
   int oflags = 0, omode;
00db10
   int read_write;
00db10
@@ -439,9 +427,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
00db10
 libc_hidden_ver (_IO_new_file_fopen, _IO_file_fopen)
00db10
 
00db10
 _IO_FILE *
00db10
-_IO_new_file_attach (fp, fd)
00db10
-     _IO_FILE *fp;
00db10
-     int fd;
00db10
+_IO_new_file_attach (_IO_FILE *fp, int fd)
00db10
 {
00db10
   if (_IO_file_is_open (fp))
00db10
     return NULL;
00db10
@@ -461,10 +447,7 @@ _IO_new_file_attach (fp, fd)
00db10
 libc_hidden_ver (_IO_new_file_attach, _IO_file_attach)
00db10
 
00db10
 _IO_FILE *
00db10
-_IO_new_file_setbuf (fp, p, len)
00db10
-     _IO_FILE *fp;
00db10
-     char *p;
00db10
-     _IO_ssize_t len;
00db10
+_IO_new_file_setbuf (_IO_FILE *fp, char *p, _IO_ssize_t len)
00db10
 {
00db10
   if (_IO_default_setbuf (fp, p, len) == NULL)
00db10
     return NULL;
00db10
@@ -479,10 +462,7 @@ libc_hidden_ver (_IO_new_file_setbuf, _IO_file_setbuf)
00db10
 
00db10
 
00db10
 _IO_FILE *
00db10
-_IO_file_setbuf_mmap (fp, p, len)
00db10
-     _IO_FILE *fp;
00db10
-     char *p;
00db10
-     _IO_ssize_t len;
00db10
+_IO_file_setbuf_mmap (_IO_FILE *fp, char *p, _IO_ssize_t len)
00db10
 {
00db10
   _IO_FILE *result;
00db10
 
00db10
@@ -509,10 +489,7 @@ static _IO_size_t new_do_write (_IO_FILE *, const char *, _IO_size_t);
00db10
    Then mark FP as having empty buffers. */
00db10
 
00db10
 int
00db10
-_IO_new_do_write (fp, data, to_do)
00db10
-     _IO_FILE *fp;
00db10
-     const char *data;
00db10
-     _IO_size_t to_do;
00db10
+_IO_new_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
00db10
 {
00db10
   return (to_do == 0
00db10
 	  || (_IO_size_t) new_do_write (fp, data, to_do) == to_do) ? 0 : EOF;
00db10
@@ -521,10 +498,7 @@ libc_hidden_ver (_IO_new_do_write, _IO_do_write)
00db10
 
00db10
 static
00db10
 _IO_size_t
00db10
-new_do_write (fp, data, to_do)
00db10
-     _IO_FILE *fp;
00db10
-     const char *data;
00db10
-     _IO_size_t to_do;
00db10
+new_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
00db10
 {
00db10
   _IO_size_t count;
00db10
   if (fp->_flags & _IO_IS_APPENDING)
00db10
@@ -554,8 +528,7 @@ new_do_write (fp, data, to_do)
00db10
 }
00db10
 
00db10
 int
00db10
-_IO_new_file_underflow (fp)
00db10
-     _IO_FILE *fp;
00db10
+_IO_new_file_underflow (_IO_FILE *fp)
00db10
 {
00db10
   _IO_ssize_t count;
00db10
 #if 0
00db10
@@ -825,9 +798,7 @@ _IO_file_underflow_maybe_mmap (_IO_FILE *fp)
00db10
 
00db10
 
00db10
 int
00db10
-_IO_new_file_overflow (f, ch)
00db10
-      _IO_FILE *f;
00db10
-      int ch;
00db10
+_IO_new_file_overflow (_IO_FILE *f, int ch)
00db10
 {
00db10
   if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
00db10
     {
00db10
@@ -888,8 +859,7 @@ _IO_new_file_overflow (f, ch)
00db10
 libc_hidden_ver (_IO_new_file_overflow, _IO_file_overflow)
00db10
 
00db10
 int
00db10
-_IO_new_file_sync (fp)
00db10
-     _IO_FILE *fp;
00db10
+_IO_new_file_sync (_IO_FILE *fp)
00db10
 {
00db10
   _IO_ssize_t delta;
00db10
   int retval = 0;
00db10
@@ -1007,11 +977,7 @@ do_ftell (_IO_FILE *fp)
00db10
 }
00db10
 
00db10
 _IO_off64_t
00db10
-_IO_new_file_seekoff (fp, offset, dir, mode)
00db10
-     _IO_FILE *fp;
00db10
-     _IO_off64_t offset;
00db10
-     int dir;
00db10
-     int mode;
00db10
+_IO_new_file_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
00db10
 {
00db10
   _IO_off64_t result;
00db10
   _IO_off64_t delta, new_offset;
00db10
@@ -1167,11 +1133,7 @@ resync:
00db10
 libc_hidden_ver (_IO_new_file_seekoff, _IO_file_seekoff)
00db10
 
00db10
 _IO_off64_t
00db10
-_IO_file_seekoff_mmap (fp, offset, dir, mode)
00db10
-     _IO_FILE *fp;
00db10
-     _IO_off64_t offset;
00db10
-     int dir;
00db10
-     int mode;
00db10
+_IO_file_seekoff_mmap (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
00db10
 {
00db10
   _IO_off64_t result;
00db10
 
00db10
@@ -1242,10 +1204,7 @@ _IO_file_seekoff_maybe_mmap (_IO_FILE *fp, _IO_off64_t offset, int dir,
00db10
 }
00db10
 
00db10
 _IO_ssize_t
00db10
-_IO_file_read (fp, buf, size)
00db10
-     _IO_FILE *fp;
00db10
-     void *buf;
00db10
-     _IO_ssize_t size;
00db10
+_IO_file_read (_IO_FILE *fp, void *buf, _IO_ssize_t size)
00db10
 {
00db10
   return (__builtin_expect (fp->_flags2 & _IO_FLAGS2_NOTCANCEL, 0)
00db10
 	  ? read_not_cancel (fp->_fileno, buf, size)
00db10
@@ -1254,27 +1213,21 @@ _IO_file_read (fp, buf, size)
00db10
 libc_hidden_def (_IO_file_read)
00db10
 
00db10
 _IO_off64_t
00db10
-_IO_file_seek (fp, offset, dir)
00db10
-     _IO_FILE *fp;
00db10
-     _IO_off64_t offset;
00db10
-     int dir;
00db10
+_IO_file_seek (_IO_FILE *fp, _IO_off64_t offset, int dir)
00db10
 {
00db10
   return __lseek64 (fp->_fileno, offset, dir);
00db10
 }
00db10
 libc_hidden_def (_IO_file_seek)
00db10
 
00db10
 int
00db10
-_IO_file_stat (fp, st)
00db10
-     _IO_FILE *fp;
00db10
-     void *st;
00db10
+_IO_file_stat (_IO_FILE *fp, void *st)
00db10
 {
00db10
   return __fxstat64 (_STAT_VER, fp->_fileno, (struct stat64 *) st);
00db10
 }
00db10
 libc_hidden_def (_IO_file_stat)
00db10
 
00db10
 int
00db10
-_IO_file_close_mmap (fp)
00db10
-     _IO_FILE *fp;
00db10
+_IO_file_close_mmap (_IO_FILE *fp)
00db10
 {
00db10
   /* In addition to closing the file descriptor we have to unmap the file.  */
00db10
   (void) __munmap (fp->_IO_buf_base, fp->_IO_buf_end - fp->_IO_buf_base);
00db10
@@ -1285,8 +1238,7 @@ _IO_file_close_mmap (fp)
00db10
 }
00db10
 
00db10
 int
00db10
-_IO_file_close (fp)
00db10
-     _IO_FILE *fp;
00db10
+_IO_file_close (_IO_FILE *fp)
00db10
 {
00db10
   /* Cancelling close should be avoided if possible since it leaves an
00db10
      unrecoverable state behind.  */
00db10
@@ -1295,10 +1247,7 @@ _IO_file_close (fp)
00db10
 libc_hidden_def (_IO_file_close)
00db10
 
00db10
 _IO_ssize_t
00db10
-_IO_new_file_write (f, data, n)
00db10
-     _IO_FILE *f;
00db10
-     const void *data;
00db10
-     _IO_ssize_t n;
00db10
+_IO_new_file_write (_IO_FILE *f, const void *data, _IO_ssize_t n)
00db10
 {
00db10
   _IO_ssize_t to_do = n;
00db10
   while (to_do > 0)
00db10
@@ -1322,10 +1271,7 @@ _IO_new_file_write (f, data, n)
00db10
 }
00db10
 
00db10
 _IO_size_t
00db10
-_IO_new_file_xsputn (f, data, n)
00db10
-     _IO_FILE *f;
00db10
-     const void *data;
00db10
-     _IO_size_t n;
00db10
+_IO_new_file_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
00db10
 {
00db10
   const char *s = (const char *) data;
00db10
   _IO_size_t to_do = n;
00db10
@@ -1405,10 +1351,7 @@ _IO_new_file_xsputn (f, data, n)
00db10
 libc_hidden_ver (_IO_new_file_xsputn, _IO_file_xsputn)
00db10
 
00db10
 _IO_size_t
00db10
-_IO_file_xsgetn (fp, data, n)
00db10
-     _IO_FILE *fp;
00db10
-     void *data;
00db10
-     _IO_size_t n;
00db10
+_IO_file_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
00db10
 {
00db10
   _IO_size_t want, have;
00db10
   _IO_ssize_t count;
00db10
@@ -1505,12 +1448,8 @@ _IO_file_xsgetn (fp, data, n)
00db10
 }
00db10
 libc_hidden_def (_IO_file_xsgetn)
00db10
 
00db10
-static _IO_size_t _IO_file_xsgetn_mmap (_IO_FILE *, void *, _IO_size_t);
00db10
 static _IO_size_t
00db10
-_IO_file_xsgetn_mmap (fp, data, n)
00db10
-     _IO_FILE *fp;
00db10
-     void *data;
00db10
-     _IO_size_t n;
00db10
+_IO_file_xsgetn_mmap (_IO_FILE *fp, void *data, _IO_size_t n)
00db10
 {
00db10
   _IO_size_t have;
00db10
   char *read_ptr = fp->_IO_read_ptr;
00db10
@@ -1564,12 +1503,8 @@ _IO_file_xsgetn_mmap (fp, data, n)
00db10
   return s - (char *) data;
00db10
 }
00db10
 
00db10
-static _IO_size_t _IO_file_xsgetn_maybe_mmap (_IO_FILE *, void *, _IO_size_t);
00db10
 static _IO_size_t
00db10
-_IO_file_xsgetn_maybe_mmap (fp, data, n)
00db10
-     _IO_FILE *fp;
00db10
-     void *data;
00db10
-     _IO_size_t n;
00db10
+_IO_file_xsgetn_maybe_mmap (_IO_FILE *fp, void *data, _IO_size_t n)
00db10
 {
00db10
   /* We only get here if this is the first attempt to read something.
00db10
      Decide which operations to use and then punt to the chosen one.  */
00db10
diff --git a/libio/iofopen.c b/libio/iofopen.c
00db10
index 44ba253e072ef18d..9262038a57b96215 100644
00db10
--- a/libio/iofopen.c
00db10
+++ b/libio/iofopen.c
00db10
@@ -35,8 +35,7 @@
00db10
 #endif
00db10
 
00db10
 _IO_FILE *
00db10
-__fopen_maybe_mmap (fp)
00db10
-     _IO_FILE *fp;
00db10
+__fopen_maybe_mmap (_IO_FILE *fp)
00db10
 {
00db10
 #ifdef _G_HAVE_MMAP
00db10
   if ((fp->_flags2 & _IO_FLAGS2_MMAP) && (fp->_flags & _IO_NO_WRITES))
00db10
@@ -58,10 +57,7 @@ __fopen_maybe_mmap (fp)
00db10
 
00db10
 
00db10
 _IO_FILE *
00db10
-__fopen_internal (filename, mode, is32)
00db10
-     const char *filename;
00db10
-     const char *mode;
00db10
-     int is32;
00db10
+__fopen_internal (const char *filename, const char *mode, int is32)
00db10
 {
00db10
   struct locked_FILE
00db10
   {
00db10
@@ -96,9 +92,7 @@ __fopen_internal (filename, mode, is32)
00db10
 }
00db10
 
00db10
 _IO_FILE *
00db10
-_IO_new_fopen (filename, mode)
00db10
-     const char *filename;
00db10
-     const char *mode;
00db10
+_IO_new_fopen (const char *filename, const char *mode)
00db10
 {
00db10
   return __fopen_internal (filename, mode, 1);
00db10
 }
00db10
diff --git a/libio/wfileops.c b/libio/wfileops.c
00db10
index 5ed1a922ae6ccbd0..d26b6e9f0a769d0b 100644
00db10
--- a/libio/wfileops.c
00db10
+++ b/libio/wfileops.c
00db10
@@ -54,10 +54,7 @@
00db10
 /* Convert TO_DO wide character from DATA to FP.
00db10
    Then mark FP as having empty buffers. */
00db10
 int
00db10
-_IO_wdo_write (fp, data, to_do)
00db10
-     _IO_FILE *fp;
00db10
-     const wchar_t *data;
00db10
-     _IO_size_t to_do;
00db10
+_IO_wdo_write (_IO_FILE *fp, const wchar_t *data, _IO_size_t to_do)
00db10
 {
00db10
   struct _IO_codecvt *cc = fp->_codecvt;
00db10
 
00db10
@@ -116,8 +113,7 @@ libc_hidden_def (_IO_wdo_write)
00db10
 
00db10
 
00db10
 wint_t
00db10
-_IO_wfile_underflow (fp)
00db10
-     _IO_FILE *fp;
00db10
+_IO_wfile_underflow (_IO_FILE *fp)
00db10
 {
00db10
   struct _IO_codecvt *cd;
00db10
   enum __codecvt_result status;
00db10
@@ -410,9 +406,7 @@ _IO_wfile_underflow_maybe_mmap (_IO_FILE *fp)
00db10
 
00db10
 
00db10
 wint_t
00db10
-_IO_wfile_overflow (f, wch)
00db10
-     _IO_FILE *f;
00db10
-     wint_t wch;
00db10
+_IO_wfile_overflow (_IO_FILE *f, wint_t wch)
00db10
 {
00db10
   if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
00db10
     {
00db10
@@ -484,8 +478,7 @@ _IO_wfile_overflow (f, wch)
00db10
 libc_hidden_def (_IO_wfile_overflow)
00db10
 
00db10
 wint_t
00db10
-_IO_wfile_sync (fp)
00db10
-     _IO_FILE *fp;
00db10
+_IO_wfile_sync (_IO_FILE *fp)
00db10
 {
00db10
   _IO_ssize_t delta;
00db10
   wint_t retval = 0;
00db10
@@ -746,11 +739,7 @@ do_ftell_wide (_IO_FILE *fp)
00db10
 }
00db10
 
00db10
 _IO_off64_t
00db10
-_IO_wfile_seekoff (fp, offset, dir, mode)
00db10
-     _IO_FILE *fp;
00db10
-     _IO_off64_t offset;
00db10
-     int dir;
00db10
-     int mode;
00db10
+_IO_wfile_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
00db10
 {
00db10
   _IO_off64_t result;
00db10
   _IO_off64_t delta, new_offset;
00db10
@@ -961,10 +950,7 @@ libc_hidden_def (_IO_wfile_seekoff)
00db10
 
00db10
 
00db10
 _IO_size_t
00db10
-_IO_wfile_xsputn (f, data, n)
00db10
-     _IO_FILE *f;
00db10
-     const void *data;
00db10
-     _IO_size_t n;
00db10
+_IO_wfile_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
00db10
 {
00db10
   const wchar_t *s = (const wchar_t *) data;
00db10
   _IO_size_t to_do = n;