# HG changeset patch # User Bruno Haible # Date 1312146205 -7200 # Node ID d9061bf1cead0de48732da36cdba043e886e8b25 # Parent fe7627541c17129004a31dab748bd3e686f9cf63 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 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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. diff --git a/doc/posix-headers/strings.texi b/doc/posix-headers/strings.texi --- a/doc/posix-headers/strings.texi +++ b/doc/posix-headers/strings.texi @@ -7,6 +7,9 @@ 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 --- 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 --- 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 @@ 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]) ])