summaryrefslogtreecommitdiff
path: root/doc/posix-functions/printf.texi
Commit message (Collapse)AuthorAgeFilesLines
* sprintf-posix: Fix test failure on AIX 7.1.Bruno Haible2011-06-191-1/+1
| | | | | | | | | | | | | | | * 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.
* test-perror: relax test to ignore cygwin bugEric Blake2011-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* docs: document recently fixed glibc printf bugEric Blake2011-05-241-0/+4
| | | | | | | | | | | | 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>
* Support non-blocking pipe I/O in write() on native Windows.Bruno Haible2011-04-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* *printf: Detect large precisions bug on Solaris 10/SPARC.Bruno Haible2010-12-241-5/+5
| | | | | | | | | | | | | | | | | | | | | * 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: document Solaris printf bug with large float precisionsPaul Eggert2010-12-221-0/+5
| | | | | | | | | | | | | | | | | | | | | * 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.
* Update for Solaris 11 2010-11.Bruno Haible2010-12-041-4/+4
| | | | | * doc/{glibc,posix}-{functions,headers}: Add info about Solaris 11 Express, released in November 2010.
* *printf-posix: Detect a bug on Solaris 10/x86.Bruno Haible2010-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | * 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.
* Update for NetBSD 5.0.Bruno Haible2010-11-211-3/+3
| | | | | | | * 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.
* Update for MacOS X 10.5.Bruno Haible2010-11-211-2/+2
| | | | | | | * 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.
* avoid some overlong lines from posix urls, etc.Karl Berry2010-08-131-1/+1
|
* Separate two tests. Mention the platforms in canonical order.Bruno Haible2009-02-281-1/+1
|
* Detect bug in cygwin 1.5.x *printf on 1-character %ls.Eric Blake2009-02-271-1/+1
| | | | | | | | | | | | | | | | * 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>
* Work around a *printf bug with %ls on Solaris.Bruno Haible2009-02-271-0/+4
|
* Fix *printf behaviour regarding the %ls directive.Bruno Haible2009-02-261-0/+3
|
* doc: mention more functions added in cygwin 1.7.0Eric Blake2009-01-191-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Refer to new POSIX:2008 standard.Bruno Haible2008-12-141-1/+1
|
* Support SIGPIPE in stdio functions for writing.Bruno Haible2008-09-261-2/+10
|
* Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.Bruno Haible2008-02-071-0/+4
|
* Rename two directories: headers -> posix-headers, functions -> posix-functions.Bruno Haible2008-01-201-0/+51