Eina: gnu_printf format attribute was introduced in gcc 4.4
authorVincent Torri <vincent.torri@gmail.com>
Mon, 20 Feb 2012 23:34:15 +0000 (23:34 +0000)
committerVincent Torri <vincent.torri@gmail.com>
Mon, 20 Feb 2012 23:34:15 +0000 (23:34 +0000)
SVN revision: 68174

legacy/eina/src/include/eina_types.h

index 259d238..b0a7cf8 100644 (file)
 # endif
 
 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
-#  define EINA_PRINTF(fmt, arg) __attribute__((__format__ (__gnu_printf__, fmt, arg)))
+#  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 3)
+#   define EINA_PRINTF(fmt, arg) __attribute__((__format__ (__gnu_printf__, fmt, arg)))
+#  else
+#   define EINA_PRINTF(fmt, arg) __attribute__((__format__ (__printf__, fmt, arg)))
+#  endif
 #  define EINA_SCANF(fmt, arg)  __attribute__((__format__ (__scanf__, fmt, arg)))
 #  define EINA_FORMAT(fmt)      __attribute__((__format_arg__(fmt)))
 #  define EINA_CONST        __attribute__((__const__))