projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
freqtabs are per-table
[pspp]
/
src
/
libpspp
/
compiler.h
diff --git
a/src/libpspp/compiler.h
b/src/libpspp/compiler.h
index 07b36b8e24d0eb9266c7dfbdc82f6bf6b69f61d0..6ce8f1aecb41f89e94f48ca3a0b03b9db42f68cc 100644
(file)
--- 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. */
/* 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)))
#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
#define SCANF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (__scanf__, FMT, FIRST)))
/* Tells the compiler that a function may be treated as if any
@@
-91,7
+95,7
@@
/* This attribute indicates that the function should be compiled
with the specified LEVEL, regardless of what has been specified
on the command line */
/* This attribute indicates that the function should be compiled
with the specified LEVEL, regardless of what has been specified
on the command line */
-#if __GNUC__ >
3
+#if __GNUC__ >
4 || (__GNUC__ == 4 && __GNUC_MINOR >= 4)
#define OPTIMIZE(LEVEL) ATTRIBUTE ((optimize(LEVEL)))
#else
#define OPTIMIZE(LEVEL)
#define OPTIMIZE(LEVEL) ATTRIBUTE ((optimize(LEVEL)))
#else
#define OPTIMIZE(LEVEL)