]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/io/fprintf/: eprintf(): Add macro to print to stderr
authorAlejandro Colomar <alx@kernel.org>
Sun, 13 Jul 2025 11:58:34 +0000 (13:58 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Mon, 20 Jul 2026 13:43:13 +0000 (15:43 +0200)
This will allow having shorter lines for writing to stderr.

This name is commonly used in other projects, it seems (see link below).

Link: <https://gcc.gnu.org/onlinedocs/gcc-3.1.1/cpp/Variadic-Macros.html>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/io/fprintf.h

index 3848d7c84e3ee9c127cc4c619ffe609000d832ca..4621b98665eed8e24f1ec01740d23870b548e353 100644 (file)
 #include "attr.h"
 
 
+// eprintf - stderr print formatted
+#define eprintf(...)  fprintf(stderr, __VA_ARGS__)
+
+
 // fprinte - FILE* print errno
 #define fprinte(stream, ...)  do                                      \
 {                                                                     \