* configure.ac: add a check for the __printf__ function attribute.

This commit is contained in:
Sam Hocevar
2008-07-20 11:11:27 +00:00
committed by sam
parent 523675e3d9
commit 1fa7c66f0f
2 changed files with 9 additions and 2 deletions
+8
View File
@@ -111,6 +111,14 @@ AC_TRY_COMPILE([],
AC_DEFINE(HAVE_PRAGMA_INIT, 1, [Define to 1 if you have pragma INIT])],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for __printf__ attribute)
AC_TRY_COMPILE([],
[extern void foo(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));],
[AC_MSG_RESULT(yes)
AC_DEFINE(ATTRIBUTE_PRINTF(x,y), __attribute__((__format__(__printf__, x, y))), [Define to the __printf__ attribute if present])],
[AC_MSG_RESULT(no)])
ac_cv_have_getopt_long="no"
AC_CHECK_FUNCS(getopt_long,
[ac_cv_have_getopt_long="yes"],
+1 -2
View File
@@ -16,8 +16,7 @@
* debug.h: debugging support
*/
extern void _zz_debug(const char *format, ...)
__attribute__((__format__(__printf__, 1, 2)));
extern void _zz_debug(const char *format, ...) ATTRIBUTE_PRINTF(1,2);
#ifdef LIBZZUF
# define debug _zz_debug