summaryrefslogtreecommitdiff
path: root/lib/stdio.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-09-18 00:58:06 +0200
committerBruno Haible <bruno@clisp.org>2011-09-18 00:58:06 +0200
commitb314f91e45ebfdb317750b4de69c8c4910e92f2d (patch)
treeb3c109ed393da8c0e38718eb8c6caf18c21186ef /lib/stdio.in.h
parent25399c1aba359704fab2f4f5164011df43e1795e (diff)
downloadgnulib-b314f91e45ebfdb317750b4de69c8c4910e92f2d.tar.gz
New module 'pclose'.
* lib/stdio.in.h (pclose): New declaration. * lib/pclose.c: New file. * m4/pclose.m4: New file. * m4/stdio_h.m4 (gl_STDIO_H): Test whether pclose is declared. (gl_STDIO_H_DEFAULTS): Initialize GNULIB_PCLOSE, HAVE_PCLOSE. * modules/stdio (Makefile.am): Substitute GNULIB_PCLOSE, HAVE_PCLOSE. * modules/pclose: New file. * modules/popen-tests (Depends-on): Add pclose. * modules/popen-safer-tests (Depends-on): Likewise. * doc/posix-functions/pclose.texi: Mention the new module.
Diffstat (limited to 'lib/stdio.in.h')
-rw-r--r--lib/stdio.in.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index a2808fb575..f5ffd85015 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -750,6 +750,20 @@ _GL_CXXALIAS_SYS (obstack_vprintf, int,
_GL_CXXALIASWARN (obstack_vprintf);
#endif
+#if @GNULIB_PCLOSE@
+# if !@HAVE_PCLOSE@
+_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pclose, int, (FILE *stream));
+_GL_CXXALIASWARN (pclose);
+#elif defined GNULIB_POSIXCHECK
+# undef pclose
+# if HAVE_RAW_DECL_PCLOSE
+_GL_WARN_ON_USE (pclose, "popen is unportable - "
+ "use gnulib module pclose for more portability");
+# endif
+#endif
+
#if @GNULIB_PERROR@
/* Print a message to standard error, describing the value of ERRNO,
(if STRING is not NULL and not empty) prefixed with STRING and ": ",