You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These functions are GNU extensions, not in C or POSIX. Clearly, the
names were badly chosen. Many systems (like MacOS) have incompatible
functions called dprintf(), usually some debugging version of printf(),
perhaps with a prototype like
void dprintf (int level, const char *format, ...);
where the first parameter is a debugging level (and output is to
stderr). Moreover, dprintf() (or DPRINTF) is also a popular macro name
for a debugging printf. So, probably, it is better to avoid this func-
tion in programs intended to be portable.
A better name would have been fdprintf().
If you are willing to do a pull request with the correct #ifdef macros
defining, say FDPRINTF, to gracefully fall back to our home brewed
nprintf(), we could certainly use it.
It's in POSIX ≥ 2008.
The text was updated successfully, but these errors were encountered: