stdio, unistd: guarantee ssize_t
authorEric Blake <ebb9@byu.net>
Wed, 6 Jan 2010 14:09:03 +0000 (07:09 -0700)
committerIan Beckwith <ianb@erislabs.net>
Sun, 10 Jan 2010 00:24:23 +0000 (00:24 +0000)
Per POSIX 2008, ssize_t needs to exist whether or not we are
replacing functions that use it.  For now, we only guarantee
it if we know that the user expects a function that uses
that type, while waiting for glibc to catch up to POSIX.

* lib/unistd.in.h (includes): Ensure that types required by POSIX
2008 are exposed when needed.
* lib/stdio.in.h (includes): Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit 60ad192b7032409b579ea059591cfd2558f57075)

ChangeLog
lib/stdio.in.h
lib/unistd.in.h

index e20f352..0dbbe19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-01-06  Eric Blake  <ebb9@byu.net>
+
+       stdio, unistd: guarantee ssize_t
+       * lib/unistd.in.h (includes): Ensure that types required by POSIX
+       2008 are exposed when needed.
+       * lib/stdio.in.h (includes): Likewise.
+       Reported by Ralf Wildenhues.
+
 2010-01-06  Paolo Bonzini  <bonzini@gnu.org>
 
        nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if.
index 1c73db6..1fc4f30 100644 (file)
 #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@)) \
-     || defined GNULIB_POSIXCHECK)
+#if (@GNULIB_FSEEKO@ || @GNULIB_FTELLO@ || @GNULIB_GETDELIM@ \
+     || @GNULIB_GETLINE@ || defined GNULIB_POSIXCHECK)
 /* Get off_t and ssize_t.  */
 # include <sys/types.h>
 #endif
index f5f97f0..f1ed8b8 100644 (file)
 # include <io.h>
 #endif
 
-#if ((@GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@)   \
-     || (@GNULIB_READLINK@ && (!@HAVE_READLINK@ || @REPLACE_READLINK@)) \
-     || (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@) \
-     || defined GNULIB_POSIXCHECK)
+#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
+     || @GNULIB_PREAD@ || defined GNULIB_POSIXCHECK)
 /* Get ssize_t.  */
 # include <sys/types.h>
 #endif