Skip to content

Commit

Permalink
Merge pull request #387 from JoesCat/2013mar5_AC_FUNC_REALLOC
Browse files Browse the repository at this point in the history
Bypass autoscan's recommendation of AC_FUNC_MALLOC or AC_FUNC_REALLOC
  • Loading branch information
davelab6 committed Mar 6, 2013
2 parents 7f6507c + 5027ddb commit 547c717
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -299,18 +299,26 @@ FONTFORGE_COMPILER_FLAGS([WARNING_CFLAGS],
-Werror=missing-prototypes
-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])
Expand Down

0 comments on commit 547c717

Please sign in to comment.