diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-11-18 16:54:53 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-18 16:54:53 +0100 |
commit | 7ce632e5535db327648a0dabf87640e53febe324 (patch) | |
tree | effba5eee24bca0bddfd897bdfd34c810e806a66 | |
parent | 35f37ce7ee40aee2f8a8fcf13dee598a3e8020e7 (diff) | |
download | tigervnc-7ce632e5535db327648a0dabf87640e53febe324.tar.gz tigervnc-7ce632e5535db327648a0dabf87640e53febe324.zip |
Update gettext.h to latest version
-rw-r--r-- | vncviewer/gettext.h | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/vncviewer/gettext.h b/vncviewer/gettext.h index 5d62f680..23b8398c 100644 --- a/vncviewer/gettext.h +++ b/vncviewer/gettext.h @@ -1,19 +1,18 @@ /* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software - Foundation, Inc. + Copyright (C) 1995-2024 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, see <https://www.gnu.org/licenses/>. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 @@ -138,7 +137,7 @@ #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) -#ifdef __GNUC__ +#if defined __GNUC__ || defined __clang__ __inline #else #ifdef __cplusplus @@ -157,7 +156,7 @@ pgettext_aux (const char *domain, return translation; } -#ifdef __GNUC__ +#if defined __GNUC__ || defined __clang__ __inline #else #ifdef __cplusplus @@ -184,9 +183,17 @@ npgettext_aux (const char *domain, #include <string.h> -#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__ && !defined __cplusplus) \ - /* || __STDC_VERSION__ == 199901L - || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ) +/* GNULIB_NO_VLA can be defined to disable use of VLAs even if supported. + This relates to the -Wvla and -Wvla-larger-than warnings, enabled in + the default GCC many warnings set. This allows programs to disable use + of VLAs, which may be unintended, or may be awkward to support portably, + or may have security implications due to non-deterministic stack usage. */ + +#if (!defined GNULIB_NO_VLA \ + && (((__GNUC__ >= 3 || defined __clang__) \ + && !defined __STRICT_ANSI__ && !defined __cplusplus) \ + /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) + || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )) # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 #else # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 @@ -201,7 +208,7 @@ npgettext_aux (const char *domain, #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) -#ifdef __GNUC__ +#if defined __GNUC__ || defined __clang__ __inline #else #ifdef __cplusplus @@ -248,7 +255,7 @@ dcpgettext_expr (const char *domain, #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) -#ifdef __GNUC__ +#if defined __GNUC__ || defined __clang__ __inline #else #ifdef __cplusplus |