From: Bruno Haible Date: Sun, 5 Jul 2020 20:06:43 +0000 (+0200) Subject: gettext.h: Update from gnulib. X-Git-Tag: v0.21~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7887468d29325e15bc323374714bc70366d8407;p=thirdparty%2Fgettext.git gettext.h: Update from gnulib. * gnulib-local/lib/gettext.h: Disable use of VLAs if GNULIB_NO_VLA is defined. --- diff --git a/gnulib-local/lib/gettext.h b/gnulib-local/lib/gettext.h index 928e6ee9b..b40ef82bd 100644 --- a/gnulib-local/lib/gettext.h +++ b/gnulib-local/lib/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -184,9 +184,16 @@ npgettext_aux (const char *domain, #include -#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) - || (__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 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ + /* || (__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