Next: vfscanf
, Previous: vdprintf
, Up: ISO C and POSIX Function Substitutes [Contents][Index]
vfprintf
POSIX specification:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/vfprintf.html
Gnulib module: vfprintf-posix or vfprintf-gnu or stdio, nonblocking, sigpipe
Portability problems fixed by either Gnulib module vfprintf-posix
or vfprintf-gnu
:
hh
, ll
,
j
, t
, z
) on some platforms:
AIX 5.1, HP-UX 11.23, Solaris 9, Cygwin 1.5.24, old mingw, MSVC 9.
w8
,
w16
, w32
, w64
, wf8
, wf16
, wf32
,
wf64
) on some platforms:
glibc 2.37, musl libc, macOS 14, FreeBSD 13.2, NetBSD 10.0, OpenBSD 7.5, AIX 7.3, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC, Android 9.0.
"%f"
, "%e"
, "%g"
of Infinity and NaN yields an
incorrect result on some platforms:
AIX 7.3, Solaris 11.4, mingw, MSVC 14.
"%2$s"
, on some platforms:
NetBSD 3.0, mingw, MSVC 14.
'
flag on some platforms:
NetBSD 3.0, Cygwin 1.5.24, mingw, MSVC 14.
"%010f"
of NaN and Infinity yields an incorrect result (padded
with zeroes, or wrong capitalization) on some platforms:
Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 7.3, Solaris 11.4, Cygwin 1.5.x, mingw, MSVC/clang.
"%#.0x"
or "%#.0X"
with a zero argument yields an
incorrect result (non-empty) on some platforms:
Mac OS X 10.6.
Portability problems fixed by Gnulib module vfprintf-gnu
:
Portability problems fixed by either Gnulib module vfprintf-posix
or vfprintf-gnu
and additionally the Gnulib module printf-with-n-directive
:
_FORTIFY_SOURCE >= 2
(set by default on Ubuntu),
macOS 14, OpenBSD, MSVC 14, Android.
Portability problems fixed by Gnulib module stdio
or vfprintf-posix
or vfprintf-gnu
, together with module nonblocking
:
errno
being set to ENOSPC
instead of EAGAIN
on some
platforms:
mingw, MSVC 14.
Portability problems fixed by Gnulib module stdio
or vfprintf-posix
or vfprintf-gnu
, together with module sigpipe
:
SIGPIPE
handler, on some platforms:
mingw, MSVC 14.
Portability problems not fixed by Gnulib:
%m
directive is not portable, use %s
mapped to an
argument of strerror(errno)
(or a version of strerror_r
)
instead.
EOF
but
does not set the error flag for ferror
on some platforms:
glibc 2.13, cygwin 1.7.9.
Next: vfscanf
, Previous: vdprintf
, Up: ISO C and POSIX Function Substitutes [Contents][Index]