New module 'fseeko'.
[pspp] / lib / stdio_.h
index 183cf7fe0674d5e88fac58ef18de778b755e0db3..54024d28521608306c7faf300c719511256b58fc 100644 (file)
 
 #else
 /* Normal invocation convention.  */
+
+#ifdef __DECC
+# include_next <stdio.h>
+#endif
+
 #ifndef _GL_STDIO_H
 #define _GL_STDIO_H
 
-#include @ABSOLUTE_STDIO_H@
+#ifndef __DECC
+# include @ABSOLUTE_STDIO_H@
+#endif
 
 #include <stdarg.h>
 #include <stddef.h>
@@ -200,6 +207,35 @@ extern int vsprintf (char *str, const char *format, va_list args)
 # endif
 #endif
 
+#if @GNULIB_FSEEKO@
+# if !@HAVE_FSEEKO@
+/* Assume 'off_t' is the same type as 'long'.  */
+#  define fseeko fseek
+# endif
+#else
+# undef fseeko
+# define fseeko(f,o,w) \
+   (GL_LINK_WARNING ("fseeko is unportable - " \
+                     "use gnulib module fseeko for portability"), \
+    fseeko (f, o, w))
+#endif
+
+#if @GNULIB_FFLUSH@
+# if @REPLACE_FFLUSH@
+#  define fflush rpl_fflush
+  /* Flush all pending data on STREAM according to POSIX rules.  Both
+     output and seekable input streams are supported.  */
+  extern int fflush (FILE *gl_stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fflush
+# define fflush(f) \
+   (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
+                     "use gnulib module fflush for portable " \
+                     "POSIX compliance"), \
+    fflush (f))
+#endif
+
 #ifdef __cplusplus
 }
 #endif