* lib/fcntl_.h: Prefer #include_next <foo.h> to #include
[pspp] / lib / stdio_.h
index 8371df47afd178e46387b2834afd1613cebf6221..787c5d1ad3e35e4550df1136cd4716d71f54c0a9 100644 (file)
 #if defined __need_FILE || defined __need___FILE
 /* Special invocation convention inside glibc header files.  */
 
-#include @ABSOLUTE_STDIO_H@
+#if @HAVE_INCLUDE_NEXT@
+# include_next <stdio.h>
+#else
+# include @ABSOLUTE_STDIO_H@
+#endif
 
 #else
 /* Normal invocation convention.  */
 
-#ifdef __DECC
+#if @HAVE_INCLUDE_NEXT@
 # include_next <stdio.h>
 #endif
 
 #ifndef _GL_STDIO_H
 #define _GL_STDIO_H
 
-#ifndef __DECC
+#if ! @HAVE_INCLUDE_NEXT@
 # include @ABSOLUTE_STDIO_H@
 #endif
 
@@ -231,6 +235,16 @@ typedef int verify_fseeko_types[2 * (sizeof (off_t) == sizeof (long)) - 1];
     fseeko (f, o, w))
 #endif
 
+#if defined GNULIB_POSIXCHECK
+# ifndef fseek
+#  define fseek(f,o,w) \
+     (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
+                       "on 32-bit platforms - " \
+                       "use fseeko function for handling of large files"), \
+      fseek (f, o, w))
+# endif
+#endif
+
 #if @GNULIB_FTELLO@
 # if !@HAVE_FTELLO@
 /* Assume 'off_t' is the same type as 'long'.  */
@@ -245,6 +259,16 @@ typedef int verify_ftello_types[2 * (sizeof (off_t) == sizeof (long)) - 1];
     ftello (f))
 #endif
 
+#if defined GNULIB_POSIXCHECK
+# ifndef ftell
+#  define ftell(f) \
+     (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
+                       "on 32-bit platforms - " \
+                       "use ftello function for handling of large files"), \
+      ftell (f))
+# endif
+#endif
+
 #if @GNULIB_FFLUSH@
 # if @REPLACE_FFLUSH@
 #  define fflush rpl_fflush