From fb2b401be4d57f035322ebba825292e66db0e999 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?=
Date: Sun, 13 Jan 2019 22:05:10 -0800
Subject: [PATCH] gettext: support disabling use of VLAs
* lib/gettext.h: Disable use of VLAs if GNULIB_NO_VLA is defined
---
ChangeLog | 5 +++++
lib/gettext.h | 7 ++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d1f0d63..2e87a1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-13 Pádraig Brady
+
+ gettext: support disabling use of VLAs
+ * lib/gettext.h: Disable use of VLAs if GNULIB_NO_VLA is defined
+
2018-12-21 Bruno Haible
Assume Autoconf >= 2.63.
diff --git a/lib/gettext.h b/lib/gettext.h
index d5d56ec..a0d854e 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -184,9 +184,10 @@ 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__) */ )
+#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
--
2.9.3