summaryrefslogtreecommitdiff
path: root/lib/stdio.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-09-26 14:30:18 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-09-26 14:30:18 -0700
commit316f8af0092ff66f564fd3052d2e35baa9a5817f (patch)
treed7800fbc711a63baa306a4279caa9e294cae8529 /lib/stdio.in.h
parentec9da8404b5f400bd4a09d16490de69d4983bf52 (diff)
downloademacs-316f8af0092ff66f564fd3052d2e35baa9a5817f.tar.gz
Merge from gnulib, improving some licensing wording.
This clarifies and fixes some licensing issues raised by Glenn Morris <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>. It also merges the latest version of texinfo.tex and has some MSVC-related changes that don't affect Emacs. * Makefile.in (GNULIB_TOOL_FLAGS): Avoid msvc-inval, msvc-nothrow, pathmax, and raise, since these are needed only to address MSVC-related issues that Emacs doesn't have. * doc/misc/texinfo.tex, lib/dup2.c, lib/gnulib.mk, lib/signal.in.h: * lib/sigprocmask.c, lib/stat.c, lib/stdio.in.h, lib/sys_stat.in.h: * lib/unistd.in.h, m4/dup2.m4, m4/getloadavg.m4, m4/gl-comp.m4: * m4/include_next.m4, m4/signal_h.m4, m4/signalblocking.m4: * m4/stdint.m4, m4/stdio_h.m4, m4/sys_stat_h.m4, m4/time_h.m4: * m4/unistd_h.m4: Merge from gnulib.
Diffstat (limited to 'lib/stdio.in.h')
-rw-r--r--lib/stdio.in.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index 473c84ce3e4..ce00af574a8 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -170,6 +170,26 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
"use gnulib module fclose for portable POSIX compliance");
#endif
+#if @GNULIB_FDOPEN@
+# if @REPLACE_FDOPEN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fdopen
+# define fdopen rpl_fdopen
+# endif
+_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
+# else
+_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
+# endif
+_GL_CXXALIASWARN (fdopen);
+#elif defined GNULIB_POSIXCHECK
+# undef fdopen
+/* Assume fdopen is always declared. */
+_GL_WARN_ON_USE (fdopen, "fdopen on Win32 platforms is not POSIX compatible - "
+ "use gnulib module fdopen for portability");
+#endif
+
#if @GNULIB_FFLUSH@
/* Flush all pending data on STREAM according to POSIX rules. Both
output and seekable input streams are supported.
@@ -750,6 +770,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 ": ",
@@ -781,6 +815,10 @@ _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
# else
+# if !@HAVE_POPEN@
+_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
# endif
_GL_CXXALIASWARN (popen);