X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=lib%2Fstdio.in.h;h=4cd3ce136d4eaa3b05e509ef458bc10bcccc3487;hp=0445c6f10735579b038c75494f6d5853a063d03a;hb=cb555a94fa5188122569ed3803c463f27ccd0261;hpb=3419874b2109f62cf21d63c87e45ae6d819fc243 diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 0445c6f1..4cd3ce13 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -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