m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Do not use __attribute__ at non gcc compilers


From: Alon Bar-Lev
Subject: [PATCH] Do not use __attribute__ at non gcc compilers
Date: Tue, 3 Jan 2012 15:27:39 +0200

This was already solved (better) in gnulib master.
---
 lib/verror.h |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/verror.h b/lib/verror.h
index 8cb511c..1d50db3 100644
--- a/lib/verror.h
+++ b/lib/verror.h
@@ -32,7 +32,10 @@ extern "C" {
 
 extern void verror (int __status, int __errnum, const char *__format,
                     va_list __args)
-     __attribute__ ((__format__ (__printf__, 3, 0)));
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+     __attribute__ ((__format__ (__printf__, 3, 0)))
+#endif
+  ;
 
 /* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
    if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
@@ -44,7 +47,10 @@ extern void verror (int __status, int __errnum, const char 
*__format,
 extern void verror_at_line (int __status, int __errnum, const char *__fname,
                             unsigned int __lineno, const char *__format,
                             va_list __args)
-     __attribute__ ((__format__ (__printf__, 5, 0)));
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+     __attribute__ ((__format__ (__printf__, 5, 0)))
+#endif
+  ;
 
 #ifdef __cplusplus
 }
-- 
1.7.3.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]