summaryrefslogtreecommitdiff
path: root/m4/jm-macros.m4
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2019-01-13 22:11:11 -0800
committerPádraig Brady <P@draigBrady.com>2019-01-19 21:15:01 -0800
commitd26dece5d86465210ffc2db205eea9140a28591d (patch)
tree4cbcc7d85cc5a125334092ee41bf3fd14f444180 /m4/jm-macros.m4
parent94fa0aa0d0e2f6a98e1c3086da9d64a1ceba9846 (diff)
downloadcoreutils-d26dece5d86465210ffc2db205eea9140a28591d.tar.gz
build: ensure VLAs are not used
Fail developer builds if VLAs are used, as there are portability concerns to consider with them. * configure.ac: Enable -Wvla which is implicit in the full list added. * m4/jm-macros.m4: Define GNULIB_NO_VLA which disables use of VLAs within gnulib code.
Diffstat (limited to 'm4/jm-macros.m4')
-rw-r--r--m4/jm-macros.m44
1 files changed, 4 insertions, 0 deletions
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 39191de27..3374137e0 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -41,6 +41,10 @@ AC_DEFUN([coreutils_MACROS],
AC_DEFINE([ARGMATCH_DIE_DECL], [void usage (int _e)],
[Define to the declaration of the xargmatch failure function.])
+ # Ensure VLAs are not used.
+ # Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC
+ AC_DEFINE([GNULIB_NO_VLA], [1], [Define to 1 to disable use of VLAs])
+
# used by shred
AC_CHECK_FUNCS_ONCE([directio])