diff options
author | Gustav HÃ¥llberg <gustav@gmail.com> | 2008-12-31 18:42:30 (GMT) |
---|---|---|
committer | Gustav HÃ¥llberg <gustav@gmail.com> | 2009-01-16 23:37:02 (GMT) |
commit | 7d440d48e6465ef859d3a88032b1d5c021ff9894 (patch) | |
tree | e4889250d7dcadca75e8dd0d992db224fdc0ff71 | |
parent | 0e21ca9d04d9edd02fde19562d5b98fb38074092 (diff) | |
download | powwow-7d440d48e6465ef859d3a88032b1d5c021ff9894.zip powwow-7d440d48e6465ef859d3a88032b1d5c021ff9894.tar.gz powwow-7d440d48e6465ef859d3a88032b1d5c021ff9894.tar.bz2 |
when compiling with GCC, use attribute((format, (printf, ...)) for tty_printf
-rw-r--r-- | tty.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -40,9 +40,16 @@ void input_moveto __P ((int new_pos)); #else /* USE_LOCALE */ +#ifdef __GNUC__ + #define PRINTF_FUNCTION(string, first) \ + __attribute__ ((format (printf, string, first))) +#else + #define PRINTF_FUNCTION(string, first) +#endif + void tty_puts __P ((const char *s)); void tty_putc __P ((char c)); -void tty_printf __P ((const char *format, ...)); +void tty_printf __P ((const char *format, ...)) PRINTF_FUNCTION(1, 2); int tty_read __P ((char *buf, size_t count)); void tty_gets __P ((char *s, int size)); void tty_flush __P ((void)); |