From: Bruno Haible Date: Sun, 31 Jul 2011 21:03:25 +0000 (+0200) Subject: strings: Add support for Minix. X-Git-Tag: v0.1~2038 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=92fc24c6e223c80b6da9a02fe6ea6f8a0b1ca7ab;p=gnulib.git strings: Add support for Minix. * lib/strings.in.h [Minix]: Include before . * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise. * doc/posix-headers/strings.texi: Document the Minix problem. --- diff --git a/ChangeLog b/ChangeLog index b95959c03..54311c4db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-07-31 Bruno Haible + strings: Add support for Minix. + * lib/strings.in.h [Minix]: Include before . + * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise. + * doc/posix-headers/strings.texi: Document the Minix problem. + +2011-07-31 Bruno Haible + wctype-h: Add support for Minix. * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towlower is declared. Set REPLACE_TOWLOWER. diff --git a/doc/posix-headers/strings.texi b/doc/posix-headers/strings.texi index 54e944edc..7a4619e4e 100644 --- a/doc/posix-headers/strings.texi +++ b/doc/posix-headers/strings.texi @@ -7,6 +7,9 @@ Gnulib module: strings Portability problems fixed by Gnulib: @itemize +@item +This header file is not self-contained on some platforms: +Minix 3.1.8. @end itemize Portability problems not fixed by Gnulib: diff --git a/lib/strings.in.h b/lib/strings.in.h index 647903ad6..a82b2d4c2 100644 --- a/lib/strings.in.h +++ b/lib/strings.in.h @@ -23,6 +23,12 @@ #endif @PRAGMA_COLUMNS@ +/* Minix 3.1.8 has a bug: must be included before . + But avoid namespace pollution on glibc systems. */ +#if defined __minix && !defined __GLIBC__ +# include +#endif + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRINGS_H@ diff --git a/m4/strings_h.m4 b/m4/strings_h.m4 index 512cb9baf..12ca5eb4a 100644 --- a/m4/strings_h.m4 +++ b/m4/strings_h.m4 @@ -1,5 +1,5 @@ # Configure a replacement for . -# serial 4 +# serial 5 # Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -20,7 +20,11 @@ AC_DEFUN([gl_HEADER_STRINGS_H_BODY], dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include + gl_WARN_ON_USE_PREPARE([[ + /* Minix 3.1.8 has a bug: must be included before + . */ + #include + #include ]], [ffs strcasecmp strncasecmp]) ])