From: Bruno Haible Date: Sun, 14 Sep 2025 16:29:29 +0000 (+0200) Subject: gettext-h: Avoid warning with gcc < 4.2. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3bcecb9d8c9e4b590e863b8e574aa59f769c60e;p=thirdparty%2Fgnulib.git gettext-h: Avoid warning with gcc < 4.2. Reported by Orgad Shaneh in . * lib/gettext.h (gettext, dgettext, dcgettext): Don't use attribute __gnu_inline__ with gcc < 4.2. --- diff --git a/ChangeLog b/ChangeLog index 8128c6ee4e..135972e2f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025-09-14 Bruno Haible + + gettext-h: Avoid warning with gcc < 4.2. + Reported by Orgad Shaneh in + . + * lib/gettext.h (gettext, dgettext, dcgettext): Don't use attribute + __gnu_inline__ with gcc < 4.2. + 2025-09-14 Pádraig Brady crc-x86_64: honor GLIBC_TUNABLES to disable acceleration diff --git a/lib/gettext.h b/lib/gettext.h index fd6c62b7eb..0650abc9a3 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -70,7 +70,12 @@ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch" # endif -__attribute__ ((__always_inline__, __gnu_inline__)) extern inline +# if __GNUC__ + (__GNUC_MINOR__ >= 2) > 4 +__attribute__ ((__always_inline__, __gnu_inline__)) +# else +__attribute__ ((__always_inline__)) +# endif +extern inline # if !defined(__sun) const # endif @@ -79,7 +84,12 @@ gettext (const char *msgid) { return msgid; } -__attribute__ ((__always_inline__, __gnu_inline__)) extern inline +# if __GNUC__ + (__GNUC_MINOR__ >= 2) > 4 +__attribute__ ((__always_inline__, __gnu_inline__)) +# else +__attribute__ ((__always_inline__)) +# endif +extern inline # if !defined(__sun) const # endif @@ -89,7 +99,12 @@ dgettext (const char *domain, const char *msgid) (void) domain; return msgid; } -__attribute__ ((__always_inline__, __gnu_inline__)) extern inline +# if __GNUC__ + (__GNUC_MINOR__ >= 2) > 4 +__attribute__ ((__always_inline__, __gnu_inline__)) +# else +__attribute__ ((__always_inline__)) +# endif +extern inline # if !defined(__sun) const # endif