summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-04-13 12:15:43 +0200
committerBruno Haible <bruno@clisp.org>2011-04-13 12:36:36 +0200
commit836e0457064eb3b0b21bd2d4954cbc428a6b6277 (patch)
tree5466b66802cbd300723885338d5a6d5fe68192a8 /doc
parentfb799692f5bb43310424977e0ca15599fc68d776 (diff)
downloadgnulib-836e0457064eb3b0b21bd2d4954cbc428a6b6277.tar.gz
Support non-blocking pipe I/O in write() on native Windows.
* lib/unistd.in.h (write): Enable replacement also if GNULIB_UNISTD_H_NONBLOCKING is 1. * lib/write.c: Enable replacement also if GNULIB_NONBLOCKING. (rpl_write): When failing to write on a non-blocking pipe, change errno from ENOSPC to EAGAIN. * lib/stdio.in.h (fprintf, fputc, fputs, fwrite, printf, putc, putchar, puts, vfprintf, vprintf): Enable replacement also if GNULIB_STDIO_H_NONBLOCKING is 1. * lib/stdio-write.c: Enable replacements also if GNULIB_NONBLOCKING. (CLEAR_ERRNO, HANDLE_ENOSPC): New macros. (CLEAR_LastError, HANDLE_ERROR_NO_DATA): New macros, extracted from CALL_WITH_SIGPIPE_EMULATION. (CALL_WITH_SIGPIPE_EMULATION): Use them. * m4/nonblocking.m4: New file. * m4/write.m4 (gl_FUNC_WRITE): Enable REPLACE_WRITE also if required for non-blocking I/O support. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_UNISTD_H_NONBLOCKING. * m4/stdio_h.m4 (gl_STDIO_H): Enable REPLACE_STDIO_WRITE_FUNCS also if required for non-blocking I/O support. (gl_STDIO_H_DEFAULTS): Initialize GNULIB_STDIO_H_NONBLOCKING. * modules/nonblocking (Files): Add m4/nonblocking.m4, lib/stdio-write.c, m4/asm-underscore.m4. (Depends-on): Add stdio, unistd. (configure.ac): Invoke gl_NONBLOCKING_IO. Define GNULIB_NONBLOCKING. Set GNULIB_STDIO_H_NONBLOCKING, GNULIB_UNISTD_H_NONBLOCKING. * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_NONBLOCKING. * modules/stdio (Makefile.am): Substitute GNULIB_STDIO_H_NONBLOCKING. * doc/posix-functions/fprintf.texi: Mention 'nonblocking' module and problem with non-blocking pipes. * doc/posix-functions/fputc.texi: Likewise. * doc/posix-functions/fputs.texi: Likewise. * doc/posix-functions/fwrite.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/putc.texi: Likewise. * doc/posix-functions/putchar.texi: Likewise. * doc/posix-functions/puts.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/write.texi: Likewise.
Diffstat (limited to 'doc')
-rw-r--r--doc/posix-functions/fprintf.texi11
-rw-r--r--doc/posix-functions/fputc.texi13
-rw-r--r--doc/posix-functions/fputs.texi13
-rw-r--r--doc/posix-functions/fwrite.texi13
-rw-r--r--doc/posix-functions/printf.texi11
-rw-r--r--doc/posix-functions/putc.texi13
-rw-r--r--doc/posix-functions/putchar.texi13
-rw-r--r--doc/posix-functions/puts.texi13
-rw-r--r--doc/posix-functions/vfprintf.texi11
-rw-r--r--doc/posix-functions/vprintf.texi11
-rw-r--r--doc/posix-functions/write.texi13
11 files changed, 117 insertions, 18 deletions
diff --git a/doc/posix-functions/fprintf.texi b/doc/posix-functions/fprintf.texi
index e922e85e08..04c4c72cae 100644
--- a/doc/posix-functions/fprintf.texi
+++ b/doc/posix-functions/fprintf.texi
@@ -4,7 +4,7 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fprintf.html}
-Gnulib module: fprintf-posix or stdio, sigpipe
+Gnulib module: fprintf-posix or stdio, nonblocking, sigpipe
Portability problems fixed by Gnulib module @code{fprintf-posix}:
@itemize
@@ -64,6 +64,15 @@ This function can crash in out-of-memory conditions on some platforms:
MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
@end itemize
+Portability problems fixed by Gnulib module @code{stdio} or @code{fprintf-posix}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
Portability problems fixed by Gnulib module @code{stdio} or @code{fprintf-posix}, together with module @code{sigpipe}:
@itemize
@item
diff --git a/doc/posix-functions/fputc.texi b/doc/posix-functions/fputc.texi
index 2f09a8a98f..9d6c9fd29c 100644
--- a/doc/posix-functions/fputc.texi
+++ b/doc/posix-functions/fputc.texi
@@ -4,9 +4,18 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fputc.html}
-Gnulib module: stdio, sigpipe
+Gnulib module: stdio, nonblocking, sigpipe
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{sigpipe}:
@itemize
@item
When writing to a pipe with no readers, this function fails, instead of
diff --git a/doc/posix-functions/fputs.texi b/doc/posix-functions/fputs.texi
index d2c46ef8bd..7fc4bf5311 100644
--- a/doc/posix-functions/fputs.texi
+++ b/doc/posix-functions/fputs.texi
@@ -4,9 +4,18 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fputs.html}
-Gnulib module: stdio, sigpipe
+Gnulib module: stdio, nonblocking, sigpipe
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{sigpipe}:
@itemize
@item
When writing to a pipe with no readers, this function fails, instead of
diff --git a/doc/posix-functions/fwrite.texi b/doc/posix-functions/fwrite.texi
index d9defec9c8..20f7fb8100 100644
--- a/doc/posix-functions/fwrite.texi
+++ b/doc/posix-functions/fwrite.texi
@@ -4,9 +4,18 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fwrite.html}
-Gnulib module: stdio, sigpipe
+Gnulib module: stdio, nonblocking, sigpipe
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{sigpipe}:
@itemize
@item
When writing to a pipe with no readers, this function fails, instead of
diff --git a/doc/posix-functions/printf.texi b/doc/posix-functions/printf.texi
index eaee96a753..df7813f6a4 100644
--- a/doc/posix-functions/printf.texi
+++ b/doc/posix-functions/printf.texi
@@ -4,7 +4,7 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/printf.html}
-Gnulib module: printf-posix or stdio, sigpipe
+Gnulib module: printf-posix or stdio, nonblocking, sigpipe
Portability problems fixed by Gnulib module @code{printf-posix}:
@itemize
@@ -64,6 +64,15 @@ This function can crash in out-of-memory conditions on some platforms:
MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
@end itemize
+Portability problems fixed by Gnulib module @code{stdio} or @code{printf-posix}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
Portability problems fixed by Gnulib module @code{stdio} or @code{printf-posix}, together with module @code{sigpipe}:
@itemize
@item
diff --git a/doc/posix-functions/putc.texi b/doc/posix-functions/putc.texi
index b7011a01be..d156461ace 100644
--- a/doc/posix-functions/putc.texi
+++ b/doc/posix-functions/putc.texi
@@ -4,9 +4,18 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/putc.html}
-Gnulib module: stdio, sigpipe
+Gnulib module: stdio, nonblocking, sigpipe
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{sigpipe}:
@itemize
@item
When writing to a pipe with no readers, this function fails, instead of
diff --git a/doc/posix-functions/putchar.texi b/doc/posix-functions/putchar.texi
index d89ab7189f..aeb6b4307c 100644
--- a/doc/posix-functions/putchar.texi
+++ b/doc/posix-functions/putchar.texi
@@ -4,9 +4,18 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/putchar.html}
-Gnulib module: stdio, sigpipe
+Gnulib module: stdio, nonblocking, sigpipe
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{sigpipe}:
@itemize
@item
When writing to a pipe with no readers, this function fails, instead of
diff --git a/doc/posix-functions/puts.texi b/doc/posix-functions/puts.texi
index 69ee72e3de..ef350ac1b1 100644
--- a/doc/posix-functions/puts.texi
+++ b/doc/posix-functions/puts.texi
@@ -4,9 +4,18 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/puts.html}
-Gnulib module: stdio, sigpipe
+Gnulib module: stdio, nonblocking, sigpipe
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{sigpipe}:
@itemize
@item
When writing to a pipe with no readers, this function fails, instead of
diff --git a/doc/posix-functions/vfprintf.texi b/doc/posix-functions/vfprintf.texi
index 7e502347de..b40a334167 100644
--- a/doc/posix-functions/vfprintf.texi
+++ b/doc/posix-functions/vfprintf.texi
@@ -4,7 +4,7 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/vfprintf.html}
-Gnulib module: vfprintf-posix or stdio, sigpipe
+Gnulib module: vfprintf-posix or stdio, nonblocking, sigpipe
Portability problems fixed by Gnulib module @code{vfprintf-posix}:
@itemize
@@ -64,6 +64,15 @@ This function can crash in out-of-memory conditions on some platforms:
MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
@end itemize
+Portability problems fixed by Gnulib module @code{stdio} or @code{vfprintf-posix}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
Portability problems fixed by Gnulib module @code{stdio} or @code{vfprintf-posix}, together with module @code{sigpipe}:
@itemize
@item
diff --git a/doc/posix-functions/vprintf.texi b/doc/posix-functions/vprintf.texi
index 526070e22d..342d182c64 100644
--- a/doc/posix-functions/vprintf.texi
+++ b/doc/posix-functions/vprintf.texi
@@ -4,7 +4,7 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/vprintf.html}
-Gnulib module: vprintf-posix or stdio, sigpipe
+Gnulib module: vprintf-posix or stdio, nonblocking, sigpipe
Portability problems fixed by Gnulib module @code{vprintf-posix}:
@itemize
@@ -64,6 +64,15 @@ This function can crash in out-of-memory conditions on some platforms:
MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
@end itemize
+Portability problems fixed by Gnulib module @code{stdio} or @code{vprintf-posix}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
Portability problems fixed by Gnulib module @code{stdio} or @code{vprintf-posix}, together with module @code{sigpipe}:
@itemize
@item
diff --git a/doc/posix-functions/write.texi b/doc/posix-functions/write.texi
index 826151c9ee..7587fbb9d9 100644
--- a/doc/posix-functions/write.texi
+++ b/doc/posix-functions/write.texi
@@ -4,9 +4,18 @@
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/write.html}
-Gnulib module: write, sigpipe
+Gnulib module: write, nonblocking, sigpipe
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
+@itemize
+@item
+When writing to a non-blocking pipe whose buffer is full, this function fails
+with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
+platforms:
+mingw.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{stdio}, together with module @code{sigpipe}:
@itemize
@item
When writing to a pipe with no readers, this function fails with error