X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fcompiler.h;h=6ce8f1aecb41f89e94f48ca3a0b03b9db42f68cc;hb=0c5a40350a72440f1745f70c5bd15d4b87d2238f;hp=fb85a553e7f6930fcc56a66859869858aa9f03fd;hpb=ff94a688e3a789eaa7ea20b41f27805d6c1970d2;p=pspp diff --git a/src/libpspp/compiler.h b/src/libpspp/compiler.h index fb85a553e7..6ce8f1aecb 100644 --- a/src/libpspp/compiler.h +++ b/src/libpspp/compiler.h @@ -38,7 +38,11 @@ /* Mark a function as taking a printf- or scanf-like format string as its FMT'th argument and that the FIRST'th argument is the first one to be checked against the format string. */ +#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__>= 4) || __GNUC__ > 4) #define PRINTF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (gnu_printf, FMT, FIRST))) +#else +#define PRINTF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (__printf__, FMT, FIRST))) +#endif #define SCANF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (__scanf__, FMT, FIRST))) /* Tells the compiler that a function may be treated as if any