Changeset 2577 for zzuf


Ignore:
Timestamp:
Jul 20, 2008, 1:11:27 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • configure.ac: add a check for the printf function attribute.
Location:
zzuf/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/configure.ac

    r2569 r2577  
    112112 [AC_MSG_RESULT(no)])
    113113
     114AC_MSG_CHECKING(for __printf__ attribute)
     115AC_TRY_COMPILE([],
     116 [extern void foo(const char *, ...)
     117     __attribute__((__format__(__printf__, 1, 2)));],
     118 [AC_MSG_RESULT(yes)
     119  AC_DEFINE(ATTRIBUTE_PRINTF(x,y), __attribute__((__format__(__printf__, x, y))), [Define to the __printf__ attribute if present])],
     120 [AC_MSG_RESULT(no)])
     121
    114122ac_cv_have_getopt_long="no"
    115123AC_CHECK_FUNCS(getopt_long,
  • zzuf/trunk/src/debug.h

    r1790 r2577  
    1717 */
    1818
    19 extern void _zz_debug(const char *format, ...)
    20        __attribute__((__format__(__printf__, 1, 2)));
     19extern void _zz_debug(const char *format, ...) ATTRIBUTE_PRINTF(1,2);
    2120
    2221#ifdef LIBZZUF
Note: See TracChangeset for help on using the changeset viewer.