c6d234
Fix potential ABI change introduced by glibc-rh1398413.patch.
c6d234
c6d234
extern void _IO_str_init_static (struct _IO_strfile_ *, char *, int, char *)
c6d234
     __THROW;
c6d234
extern void _IO_str_init_readonly (struct _IO_strfile_ *, const char *, int)
c6d234
     __THROW;
c6d234
c6d234
Upstream, this did not have any effect because the function definitions
c6d234
were prototypes, so there is no upstream fix necessary.
c6d234
c6d234
But downstream, we have:
c6d234
c6d234
     70 void
c6d234
     71 _IO_str_init_static (sf, ptr, size, pstart)
c6d234
     72      _IO_strfile *sf;
c6d234
     73      char *ptr;
c6d234
     74      int size;
c6d234
     75      char *pstart;
c6d234
     76 {
c6d234
     77   return _IO_str_init_static_internal (sf, ptr, size < 0 ? -1 : size, pstart);
c6d234
     78 }
c6d234
     79 
c6d234
     80 void
c6d234
     81 _IO_str_init_readonly (sf, ptr, size)
c6d234
     82      _IO_strfile *sf;
c6d234
     83      const char *ptr;
c6d234
     84      int size;
c6d234
     85 {
c6d234
     86   _IO_str_init_static_internal (sf, (char *) ptr, size < 0 ? -1 : size, NULL);
c6d234
     87   sf->_sbf._f._IO_file_flags |= _IO_NO_WRITES;
c6d234
     88 }
c6d234
c6d234
This results in:
c6d234
c6d234
strops.c:71:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
c6d234
strops.c:81:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
c6d234
c6d234
It is a potential ABI change, depending on the architecture.  None of
c6d234
the architectures in Red Hat Enterprise Linux appear to be affected,
c6d234
though.
c6d234
c6d234
diff --git a/libio/strops.c b/libio/strops.c
c6d234
index 7df842fa519e4a49..a5b76af963e77877 100644
c6d234
--- a/libio/strops.c
c6d234
+++ b/libio/strops.c
c6d234
@@ -68,20 +68,13 @@ _IO_str_init_static_internal (sf, ptr, size, pstart)
c6d234
 }
c6d234
 
c6d234
 void
c6d234
-_IO_str_init_static (sf, ptr, size, pstart)
c6d234
-     _IO_strfile *sf;
c6d234
-     char *ptr;
c6d234
-     int size;
c6d234
-     char *pstart;
c6d234
+_IO_str_init_static (_IO_strfile *sf, char *ptr, int size, char *pstart)
c6d234
 {
c6d234
   return _IO_str_init_static_internal (sf, ptr, size < 0 ? -1 : size, pstart);
c6d234
 }
c6d234
 
c6d234
 void
c6d234
-_IO_str_init_readonly (sf, ptr, size)
c6d234
-     _IO_strfile *sf;
c6d234
-     const char *ptr;
c6d234
-     int size;
c6d234
+_IO_str_init_readonly (_IO_strfile *sf, const char *ptr, int size)
c6d234
 {
c6d234
   _IO_str_init_static_internal (sf, (char *) ptr, size < 0 ? -1 : size, NULL);
c6d234
   sf->_sbf._f._IO_file_flags |= _IO_NO_WRITES;