From e02e32f71f6c24fcc69bdaf58f6f9e973a017896 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 10 Dec 2022 13:49:56 -0800 Subject: Replace uTypedRealloc() with direct reallocarray() calls Falls back to realloc() if platform doesn't offer reallocarray(). Also removes uRealloc() since it had no other uses. Signed-off-by: Alan Coopersmith --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3aedf48..bdf5589 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,11 @@ AC_INIT([xkbcomp], [1.4.6], AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) +# Set common system defines for POSIX extensions, such as _GNU_SOURCE +# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL) +# to avoid autoconf errors. +AC_USE_SYSTEM_EXTENSIONS + # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-xz]) @@ -45,7 +50,7 @@ if test ! -f "$srcdir/xkbparse.c"; then fi fi -AC_CHECK_FUNCS([strdup strcasecmp]) +AC_CHECK_FUNCS([reallocarray strdup strcasecmp]) # Checks for pkg-config packages PKG_CHECK_MODULES(XKBCOMP, [x11 xkbfile xproto >= 7.0.17]) -- cgit v1.2.3