Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #387 from JoesCat/2013mar5_AC_FUNC_REALLOC

Bypass autoscan's recommendation of AC_FUNC_MALLOC or AC_FUNC_REALLOC
  • Loading branch information...
commit 547c717de056bf6fd9a7435f9026b1375ef01ca4 2 parents 7f6507c + 5027ddb
@davelab6 davelab6 authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 configure.ac
View
12 configure.ac
@@ -300,17 +300,25 @@ FONTFORGE_COMPILER_FLAGS([WARNING_CFLAGS],
-Werror=implicit])
#--------------------------------------------------------------------------
+# Bypass older autoscan recommendations (if anyone decides to run autoscan)
+# These packages promises to not use malloc(0) or realloc(n, 0) so we don't
+# want autoscan to suggest using AC_FUNC_MALLOC or AC_FUNC_REALLOC, by
+# redefining the problem
+m4_define([AN_FUNCTION], [m4_if([$1], [malloc], [],
+ [AN_OUTPUT([function], $@)])])
+m4_define([AN_FUNCTION], [m4_if([$1], [realloc], [],
+ [AN_OUTPUT([function], $@)])])
+
+#--------------------------------------------------------------------------
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
-AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_MMAP
if test x"${ac_cv_func_mmap_fixed_mapped}" != xyes; then
AC_DEFINE([_NO_MMAP],1,[Define if not using mmap.])
fi
-AC_FUNC_REALLOC
AC_FUNC_STRCOLL
AC_FUNC_STRTOD
AC_CHECK_FUNCS([alarm atexit dup2 endpwent floor])
Please sign in to comment.
Something went wrong with that request. Please try again.