dprintf ¶POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/dprintf.html
Gnulib module: dprintf or dprintf-posix or dprintf-gnu
Portability problems fixed by either Gnulib module dprintf or dprintf-posix or dprintf-gnu:
Portability problems fixed by either Gnulib module dprintf-posix or dprintf-gnu:
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.
' flag at all on some platforms:
mingw without __USE_MINGW_ANSI_STDIO, MSVC 14.
' flag correctly for integers
(it uses the decimal point instead of the thousands separator!)
on some platforms:
mingw with __USE_MINGW_ANSI_STDIO.
' flag together with a precision
on an integer argument correctly on some platforms:
glibc 2.36, FreeBSD 14.0, NetBSD 10.0, Solaris 11, Cygwin 3.6.0, Haiku.
' flag correctly in locales where
the thousands separator is a multibyte character on some platforms:
NetBSD 10.0, Solaris 11 OpenIndiana.
"%010f" of NaN and Infinity yields an incorrect result (padded
with zeroes, or wrong capitalization) on some platforms:
AIX 7.3, Solaris 11.4.
"%#.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 dprintf-gnu:
Portability problems fixed by either Gnulib module dprintf-posix or dprintf-gnu
and additionally the Gnulib module printf-with-n-directive:
_FORTIFY_SOURCE >= 2 (set by default on Ubuntu),
macOS 14, OpenBSD, Android.
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.
errno or the
stream error indicator on attempts to write to a read-only stream:
Cygwin 1.7.9.