The macro might define it to something else, but the non-macro version
is also used in some cases, e.g. in gcc 4.8's collect2 on Debian with
eglibc 2.17-7.
int, c, FILE *, stream)
HOOK_FILE2(int, putc, stream,
int, c, FILE *, stream)
int, c, FILE *, stream)
HOOK_FILE2(int, putc, stream,
int, c, FILE *, stream)
+/* The glibc uses a macro for putc() which expands to _IO_putc(). However
+ * sometimes the raw putc() is used as well, not sure why. Make sure to hook
+ * it too. */
+#ifdef putc
+# undef putc
+HOOK_FILE2(int, putc, stream,
+ int, c, FILE *, stream)
+#endif
HOOK_FILE1(int, putchar, stdout,
int, c)
HOOK_FILE1(int, puts, stdout,
HOOK_FILE1(int, putchar, stdout,
int, c)
HOOK_FILE1(int, puts, stdout,