--- liblangtag/lt-macros.h +++ liblangtag/lt-macros.h @@ -120,7 +120,7 @@ * It allows the compiler to type-check the arguments passed to the function. * See the GNU C documentation for details. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#if (defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))) || defined __clang__ # define LT_GNUC_PRINTF(format_idx, arg_idx) \ __attribute__((__format__ (__printf__, format_idx, arg_idx))) #else /* !__GNUC__ */ @@ -136,7 +136,7 @@ * explicit %NULL. * See the GNU C documentation for details. */ -#if __GNUC__ >= 4 +#if (defined __GNUC__ &&__GNUC__ >= 4) || defined __clang__ # define LT_GNUC_NULL_TERMINATED \ __attribute__((__sentinel__)) #else /* !__GNUC__ */