Ben Pfaff wrote:

> Would it be possible to apply a similar fix to string_.h?  Under
> mingw, I see the following warnings when compiling a file that
> just contains the single line "#include <string.h>":
> 
>     [EMAIL PROTECTED]:~/pspp/mingw/pspp/_mingw/gl(0)$ i586-mingw32msvc-gcc -c 
> -I. -Drestrict=  -Wmissing-prototypes include-string.c 
>     In file included from ./string.h:23,
>                      from include-string.c:1:
>     
> ///usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include/string.h:97:
>  warning: no previous prototype for 'strcasecmp'
>     
> ///usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include/string.h:103:
>  warning: no previous prototype for 'strncasecmp'
>     [EMAIL PROTECTED]:~/pspp/mingw/pspp/_mingw/gl(0)$ 

Ok, I'm applying this.

2007-02-19  Bruno Haible  <[EMAIL PROTECTED]>

        * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
        warnings.
        Reported by Ben Pfaff <[EMAIL PROTECTED]>.

*** lib/string_.h       17 Feb 2007 22:21:32 -0000      1.26
--- lib/string_.h       20 Feb 2007 00:09:04 -0000
***************
*** 19,24 ****
--- 19,30 ----
  #ifndef _GL_STRING_H
  #define _GL_STRING_H
  
+ /* This #pragma avoids a warning with "gcc -Wmissing-prototypes" on some
+    mingw systems.  */
+ #ifdef __GNUC__
+ # pragma GCC system_header
+ #endif
+ 
  #include @ABSOLUTE_STRING_H@
  
  



Reply via email to