* configure.ac: add a check for the __printf__ function attribute.
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user