summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-05 12:59:08 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-05 12:59:08 -0700
commitaa18133456139b8ad21b2e83f040bae601bdf98f (patch)
tree5391aa2d158a7e8e37fdaa4cfcaab68cfc64eb7d /configure.in
parent9e0e57c7d64492351f4a7ce1c01054d4d43a1bcc (diff)
downloademacs-aa18133456139b8ad21b2e83f040bae601bdf98f.tar.gz
* configure.in (ATTRIBUTE_FORMAT, ATTRIBUTE_FORMAT_PRINTF): New macros.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 77deef8dba5..fef19f27642 100644
--- a/configure.in
+++ b/configure.in
@@ -3581,6 +3581,20 @@ typedef unsigned size_t;
#define EXTERNALLY_VISIBLE
#endif
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define ATTRIBUTE_FORMAT(spec) /* empty */
+#endif
+
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
+ ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
+#else
+# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
+ ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+#endif
+
/* Some versions of GNU/Linux define noinline in their headers. */
#ifdef noinline
#undef noinline