]> sjero.net Git - wget/blobdiff - lib/stdio.in.h
Check for idna.h in /usr/include/idn.
[wget] / lib / stdio.in.h
index 0445c6f10735579b038c75494f6d5853a063d03a..4cd3ce136d4eaa3b05e509ef458bc10bcccc3487 100644 (file)
@@ -414,6 +414,9 @@ extern long rpl_ftell (FILE *fp);
 # if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@
   /* Discard all pending buffered I/O data on STREAM.
      STREAM must not be wide-character oriented.
+     When discarding pending output, the file position is set back to where it
+     was before the write calls.  When discarding pending input, the file
+     position is advanced to match the end of the previously read input.
      Return 0 if successful.  Upon error, return -1 and set errno.  */
   extern int fpurge (FILE *gl_stream);
 # endif
@@ -476,6 +479,20 @@ extern int puts (const char *string);
 extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
 #endif
 
+#if @GNULIB_POPEN@
+# if @REPLACE_POPEN@
+#  undef popen
+#  define popen rpl_popen
+extern FILE *popen (const char *cmd, const char *mode);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef popen
+# define popen(c,m) \
+   (GL_LINK_WARNING ("popen is buggy on some platforms - " \
+                     "use gnulib module popen or pipe for more portability"), \
+    popen (c, m))
+#endif
+
 #if @GNULIB_GETDELIM@
 # if !@HAVE_DECL_GETDELIM@
 /* Read input, up to (and including) the next occurrence of DELIMITER, from