The pattern is to have two copies of an include file, in this case
printf.h and _printf.h. The latter is #included only in the
implementation file, and provides prototypes. The former #includes the
latter, but also poisons all the identifiers.
This pattern is because otherwise it's very easy to forget to use the e*
versions of functions. Using e.g. printf instead of eprintf is an easy
mistake to make, and will result in errors being silently ignored.
--- /dev/null
+void evfprintf(FILE *file, const char *fmt, va_list args);
+void efprintf(FILE *file, const char *fmt, ...);
+void eprintf(const char *fmt, ...);
-void evfprintf(FILE *file, const char *fmt, va_list args);
-void efprintf(FILE *file, const char *fmt, ...);
-void eprintf(const char *fmt, ...);
+#include "_printf.h"
+#pragma GCC poison vfprintf
+#pragma GCC poison fprintf
+#pragma GCC poison printf
#include <stdarg.h>
#include <stdio.h>
#include "abort.h"
-#include "printf.h"
+#include "_printf.h"
#include <errno.h>
#include <stdlib.h>