gettimeofday: port recent C++ fix to Emacs
[gnulib.git] / doc / posix-functions / scanf.texi
1 @node scanf
2 @section @code{scanf}
3 @findex scanf
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/scanf.html}
6
7 Gnulib module: stdio, nonblocking
8
9 Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
10 @itemize
11 @item
12 When reading from a non-blocking pipe whose buffer is empty, this function
13 fails with @code{errno} being set to @code{EINVAL} instead of @code{EAGAIN} on
14 some platforms:
15 mingw, MSVC 9.
16 @end itemize
17
18 Portability problems not fixed by Gnulib:
19 @itemize
20 @item
21 C99 and POSIX.1-2001 and later require end-of-file to be sticky, that
22 is, they require this function to act as if it reads end-of-file if
23 @code{feof} would return nonzero.  However, on some systems this
24 function attempts to read from the underlying file descriptor even if
25 the stream's end-of-file indicator is set.  These systems include
26 glibc and default Solaris.
27 @item
28 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
29 upon failure.
30 @item
31 On Windows, this function doesn't support the @code{hh}, @code{ll}, @code{j},
32 @code{t}, @code{z} size specifiers.
33 @end itemize