+2009-12-24 Eric Blake <ebb9@byu.net>
+
+ build: pull in conditional headers during GNULIB_POSIXCHECK
+ * lib/stdio.in.h (includes): Using GNULIB_POSIXCHECK also requires
+ definitions from any conditionally-included headers.
+ * lib/stdlib.in.h (includes): Likewise.
+ * lib/unistd.in.h (includes): Likewise.
+
2009-12-24 Bruno Haible <bruno@clisp.org>
* tests/test-argv-iter.c: Include header file being tested immediately
#include <stdarg.h>
#include <stddef.h>
-#if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
- || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
- || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
- || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@))
+#if ((@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
+ || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
+ || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
+ || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@)) \
+ || defined GNULIB_POSIXCHECK)
/* Get off_t and ssize_t. */
# include <sys/types.h>
#endif
#include <stddef.h>
/* Solaris declares getloadavg() in <sys/loadavg.h>. */
-#if @GNULIB_GETLOADAVG@ && @HAVE_SYS_LOADAVG_H@
+#if (@GNULIB_GETLOADAVG@ || defined GNULIB_GETLOADAVG) && @HAVE_SYS_LOADAVG_H@
# include <sys/loadavg.h>
#endif
# include <random.h>
#endif
-#if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
+#if (@GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@ \
+ || defined GNULIB_POSIXCHECK)
# include <stdint.h>
#endif
/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
- || @GNULIB_SYMLINKAT@)
+ || @GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)
# include <stdio.h>
#endif
/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
-#if @GNULIB_UNLINKAT@
+#if @GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK
# include <fcntl.h>
#endif
#include <stdlib.h>
/* mingw declares getcwd in <io.h>, not in <unistd.h>. */
-#if @GNULIB_GETCWD@ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
# include <io.h>
#endif
#if ((@GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@) \
|| (@GNULIB_READLINK@ && (!@HAVE_READLINK@ || @REPLACE_READLINK@)) \
- || (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@))
+ || (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@) \
+ || defined GNULIB_POSIXCHECK)
/* Get ssize_t. */
# include <sys/types.h>
#endif