From: Bruno Haible Date: Fri, 15 Sep 2023 22:27:42 +0000 (+0200) Subject: intl: Improve support for clang. X-Git-Tag: v0.23~396 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea3ddd208d67d8a7683450a8e7b56a47721cbdc8;p=thirdparty%2Fgettext.git intl: Improve support for clang. * gettext-runtime/intl/libgnuintl.in.h (_INTL_MAY_RETURN_STRING_ARG): Use __attribute__ also for clang. --- diff --git a/gettext-runtime/intl/libgnuintl.in.h b/gettext-runtime/intl/libgnuintl.in.h index be65ecf47..f551c94e6 100644 --- a/gettext-runtime/intl/libgnuintl.in.h +++ b/gettext-runtime/intl/libgnuintl.in.h @@ -111,7 +111,7 @@ extern int libintl_version; /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return its n-th argument literally. This enables GCC to warn for example about printf (gettext ("foo %y")). */ -#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus) +#if ((defined __GNUC__ && __GNUC__ >= 3) || defined __clang__) && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus) # define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) #else # define _INTL_MAY_RETURN_STRING_ARG(n)