Commit d80cc0ae authored by Niels Möller's avatar Niels Möller
Browse files

* src/argp/argp-fmtstream.h (PRINTF_STYLE): Define this macro,

to expand to __attribute__ ... if compiling with gcc.

Rev: src/argp/argp-fmtstream.h:1.8
parent da04f539
......@@ -99,6 +99,17 @@ typedef FILE *argp_fmtstream_t;
#ifndef __const
#define __const const
#endif
/* FIXME: We could use a configure test to check for __attribute__,
* just like lsh does. */
#ifndef PRINTF_STYLE
# if __GNUC__ >= 2
# define PRINTF_STYLE(f, a) __attribute__ ((__format__ (__printf__, f, a)))
# else
# define PRINTF_STYLE(f, a)
# endif
#endif
struct argp_fmtstream
{
......@@ -140,10 +151,10 @@ extern void argp_fmtstream_free (argp_fmtstream_t __fs);
extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
__const char *__fmt, ...)
__attribute__ ((__format__ (printf, 2, 3)));
PRINTF_STYLE(2,3);
extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
__const char *__fmt, ...)
__attribute__ ((__format__ (printf, 2, 3)));
PRINTF_STYLE(2,3);
extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment