X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fargpar%2Fargpar.c;h=5bd2652e00bd195f386c75c10bf339f996a52325;hp=ad56838fad853f15629a06f25dcec82b91d07d85;hb=8b305066676fc7aa433e8eb668f9de8802008025;hpb=28ba44ad9ca14153e96c94a9100423ea224c1af3 diff --git a/src/argpar/argpar.c b/src/argpar/argpar.c index ad56838f..5bd2652e 100644 --- a/src/argpar/argpar.c +++ b/src/argpar/argpar.c @@ -35,7 +35,13 @@ #define ARGPAR_ASSERT(_cond) assert(_cond) -static +#ifdef __MINGW_PRINTF_FORMAT +# define ARGPAR_PRINTF_FORMAT __MINGW_PRINTF_FORMAT +#else +# define ARGPAR_PRINTF_FORMAT printf +#endif + +static __attribute__((format(ARGPAR_PRINTF_FORMAT, 1, 0))) char *argpar_vasprintf(const char *fmt, va_list args) { int len1, len2; @@ -65,7 +71,7 @@ end: } -static +static __attribute__((format(ARGPAR_PRINTF_FORMAT, 1, 2))) char *argpar_asprintf(const char *fmt, ...) { va_list args; @@ -78,7 +84,7 @@ char *argpar_asprintf(const char *fmt, ...) return str; } -static +static __attribute__((format(ARGPAR_PRINTF_FORMAT, 2, 3))) bool argpar_string_append_printf(char **str, const char *fmt, ...) { char *new_str = NULL;