| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/printf.m4 (gl_PRINTF_PRECISION): Test against AIX bug.
* doc/posix-functions/dprintf.texi: Mention limited precision problem
on AIX.
* doc/posix-functions/fprintf.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/vdprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glibc was not the only platform where fprintf(fopen(,"r"))
fails to detect errors; cygwin 1.7.9 is another culprit
(although it will be fixed for 1.7.10), and I suspect that
several other platforms were failing perror2 for the same
reason.
At this point, there are so many functions affected, and
the way to avoid the bug is easy enough (don't pass bogus
streams to output-producing functions), that I'm not worried
about fixing things other than to document them.
* tests/test-perror2.c (main): Relax test on requiring detection
of stream errors, and use unbuffered stream.
* doc/posix-functions/dprintf.texi (dprintf): Document bug.
* doc/posix-functions/fprintf.texi (fprintf): Likewise.
* doc/posix-functions/fputc.texi (fputc): Likewise.
* doc/posix-functions/fputs.texi (fputs): Likewise.
* doc/posix-functions/fputws.texi (fputws): Likewise.
* doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
* doc/posix-functions/fwrite.texi (fwrite): Likewise.
* doc/posix-functions/getopt.texi (getopt): Likewise.
* doc/posix-functions/perror.texi (perror): Likewise.
* doc/posix-functions/printf.texi (printf): Likewise.
* doc/posix-functions/psiginfo.texi (psiginfo): Likewise.
* doc/posix-functions/psignal.texi (psignal): Likewise.
* doc/posix-functions/putc.texi (putc): Likewise.
* doc/posix-functions/putc_unlocked.texi (putc_unlocked):
Likewise.
* doc/posix-functions/putchar.texi (putchar): Likewise.
* doc/posix-functions/putchar_unlocked.texi (putchar_unlocked):
Likewise.
* doc/posix-functions/puts.texi (puts): Likewise.
* doc/posix-functions/putwc.texi (putwc): Likewise.
* doc/posix-functions/putwchar.texi (putwchar): Likewise.
* doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
* doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
* doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
* doc/posix-functions/vprintf.texi (vprintf): Likewise.
* doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
* doc/posix-functions/wordexp.texi (wordexp): Likewise.
* doc/posix-functions/wprintf.texi (wprintf): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Document it as a known bug, but one where we don't provide a
workaround since programmers are unlikely to hit it in practice.
* doc/posix-functions/fprintf.texi (fprintf): Document it.
* doc/posix-functions/printf.texi (printf): Likewise.
* doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
* doc/posix-functions/vprintf.texi (vprintf): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/printf.m4 (gl_PRINTF_PRECISION): Add one more test code, provided
by Paul Eggert.
* tests/test-snprintf-posix.h (test_function): Add this test code here
too.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* doc/posix-functions/fprintf.texi: Mention Solaris 10 bug as worked
around by gnulib.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
* doc/posix-functions/dprintf.texi: Undo last commit.
* doc/posix-functions/vdprintf.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/dprintf.texi (dprintf):
* doc/posix-functions/fprintf.texi (fprintf):
* doc/posix-functions/printf.texi (printf):
* doc/posix-functions/snprintf.texi (snprintf):
* doc/posix-functions/sprintf.texi (sprintf):
* doc/posix-functions/vdprintf.texi (vdprintf):
* doc/posix-functions/vfprintf.texi (vfprintf):
* doc/posix-functions/vprintf.texi (vprintf):
* doc/posix-functions/vsnprintf.texi (vsnprintf):
* doc/posix-functions/vsprintf.texi (vsprintf):
Mention that these functions mishandle large floating point
precisions on Solaris 10. The same bug is also present in Solaris
8, and I assume earlier. This causes "cd gnulib-tests; make
check" to fail on Solaris 8 (and I assume, later) when building
the latest coreutils, in test-vasprintf-posix's call to
my_asprintf (&result, "%.4000f %d", 1.0, 99). I have not checked
the wide flavors (e.g., wprintf) so this patch just updates the
documentation for the narrow ones.
|
|
|
|
|
| |
* doc/{glibc,posix}-{functions,headers}: Add info about Solaris 11
Express, released in November 2010.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/printf.m4 (gl_PRINTF_PRECISION): Detect crash with large precision
for floating-point output.
* tests/test-vasnprintf-posix.c (test_function): Test precision with %f
directive.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* doc/posix-functions/fprintf.texi: Mention Solaris/x86 bug.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
* doc/glibc-functions/obstack_printf.texi: Likewise.
* doc/glibc-functions/obstack_vprintf.texi: Likewise.
|
|
|
|
|
|
|
| |
* m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on
NetBSD; the test fails on NetBSD 5.0.
* doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info
about NetBSD.
|
|
|
|
|
|
|
| |
* m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on
MacOS X; the test fails on MacOS X 10.5.8.
* doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info
about MacOS X.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Enhance filter.
* doc/posix-functions/fprintf.texi: Update.
* doc/posix-functions/printf.texi: Update.
* doc/posix-functions/snprintf.texi: Update.
* doc/posix-functions/sprintf.texi: Update.
* doc/posix-functions/vfprintf.texi: Update.
* doc/posix-functions/vprintf.texi: Update.
* doc/posix-functions/vsnprintf.texi: Update.
* doc/posix-functions/vsprintf.texi: Update.
* doc/glibc-functions/obstack_printf.texi: Update.
* doc/glibc-functions/obstack_vprintf.texi: Update.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/abort.texi (abort): Update wording related
to cygwin.
* doc/posix-functions/daylight.texi (daylight): Likewise.
* doc/posix-functions/optarg.texi (optarg): Likewise.
* doc/posix-functions/optarg.texi (opterr): Likewise.
* doc/posix-functions/optarg.texi (optind): Likewise.
* doc/posix-functions/optarg.texi (optopt): Likewise.
* doc/posix-functions/wprintf.texi (wprintf): Cygwin wprintf never
worked in 1.5.x, and was withdrawn in 1.7.
* doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
* doc/posix-functions/fprintf.texi (fprintf): Tighten mention of
cygwin versions.
* doc/posix-functions/perror.texi (perror): Likewise.
* doc/posix-functions/printf.texi (printf): Likewise.
* doc/posix-functions/snprintf.texi (snprintf): Likewise.
* doc/posix-functions/sprintf.texi (sprintf): Likewise.
* doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
* doc/posix-functions/vprintf.texi (vprintf): Likewise.
* doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
* doc/posix-functions/vsprintf.texi (vsprintf): Likewise.
* doc/glibc-functions/obstack_printf.texi (obstack_printf):
Likewise.
* doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf):
Likewise.
* doc/glibc-functions/cfmakeraw.texi (cfmakeraw): Cygwin 1.7 adds
this function.
* doc/glibc-functions/in6addr_any.texi (in6addr_any): Likewise.
* doc/glibc-functions/in6addr_loopback.texi (in6addr_loopback):
Likewise.
* doc/glibc-functions/updwtmpx.texi (updwtmpx): Likewise.
* doc/posix-functions/_Exit_C99.texi (_Exit): Likewise.
* doc/posix-functions/confstr.texi (confstr): Likewise.
* doc/posix-functions/dprintf.texi (dprintf): Likewise.
* doc/posix-functions/fgetwc.texi (fgetwc): Likewise.
* doc/posix-functions/fgetws.texi (fgetws): Likewise.
* doc/posix-functions/fputwc.texi (fputwc): Likewise.
* doc/posix-functions/fputws.texi (fputws): Likewise.
* doc/posix-functions/fwide.texi (fwide): Likewise.
* doc/posix-functions/getwc.texi (getwc): Likewise.
* doc/posix-functions/getwchar.texi (getwchar): Likewise.
* doc/posix-functions/putwc.texi (putwc): Likewise.
* doc/posix-functions/putwchar.texi (putwchar): Likewise.
* doc/posix-functions/sigignore.texi (sigignore): Likewise.
* doc/posix-functions/ungetwc.texi (ungetwc): Likewise.
* doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
* doc/posix-functions/wcpcpy.texi (wcpcpy): Likewise.
* doc/posix-functions/wcpncpy.texi (wcpncpy): Likewise.
* doc/posix-functions/wcstol.texi (wcstol): Likewise.
* doc/posix-functions/wcstoll.texi (wcstoll): Likewise.
* doc/posix-functions/wcstoul.texi (wcstoul): Likewise.
* doc/posix-functions/wcstoull.texi (wcstoull): Likewise.
* doc/posix-functions/wcsxfrm.texi (wcsxfrm): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
| |
|
| |
|
| |
|
|
|