diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-05-08 11:14:11 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-05-08 11:15:19 -0700 |
commit | 3ff95c472abe8eb8fe1ccda5cd40d99407f1f9a4 (patch) | |
tree | d0de103c0810bc6a3b457f0491cc0cb5b3354740 /configure.ac | |
parent | a6a3bd1365798783f3fa5552d4ab061d5636d15a (diff) |
Import reallocarray() from libX11 (originally from OpenBSD)
Wrapper for realloc() that checks for overflow when multiplying
arguments together, so we don't have to add overflow checks to
every single call. For documentation on usage, see:
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a8f8c40..7735f51 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,9 @@ AC_CHECK_LIB(z, gzclose, [], # Obtain compiler/linker options for dependencies PKG_CHECK_MODULES(FONTENC, xproto) +# Checks for library functions. +AC_REPLACE_FUNCS([reallocarray]) + # Allow checking code with lint, sparse, etc. XORG_WITH_LINT LINT_FLAGS="${LINT_FLAGS} ${FONTENC_CFLAGS}" |