X-Git-Url: https://git.tokkee.org/?p=nagiosplug.git;a=blobdiff_plain;f=gl%2Fstdio.in.h;h=80b9dbfda341628f7db7e77b4697620a4eb5dd27;hp=dcb8ee573b6bfd623c4d2f3a8dd030824b6c1925;hb=18f6835edaf7d640a2c9e476cb1babdbdadbfd9b;hpb=f61412478ceb7c821793c8356b936f64066508bf diff --git a/gl/stdio.in.h b/gl/stdio.in.h index dcb8ee5..80b9dbf 100644 --- a/gl/stdio.in.h +++ b/gl/stdio.in.h @@ -63,6 +63,10 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ +/* Macros for stringification. */ +#define _GL_STDIO_STRINGIZE(token) #token +#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) + #if @GNULIB_DPRINTF@ # if @REPLACE_DPRINTF@ @@ -640,16 +644,26 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# if defined __GNUC__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# define GNULIB_overrides_printf 1 +# define printf __printf__ +# endif _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *format, ...) + __asm__ (@ASM_SYMBOL_PREFIX@ + _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); +# else +_GL_FUNCDECL_RPL (printf, int, + (const char *format, ...) + __attribute__ ((__format__ (__printf__, 1, 2))) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); +# endif +# define GNULIB_overrides_printf 1 # else _GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); # endif