diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-02-15 20:13:53 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-02-15 20:13:53 -0500 |
commit | 3e2b48f8b4eee456c4aa81f640185382642fa75c (patch) | |
tree | 719458a6af5ee29443c1fd44fa5fc539e6e892c6 /configure.ac | |
parent | cfff582e4d68b4026d19c4cee4c2d893aaab116f (diff) | |
parent | 4dc228e35bbedb6f451a621db4a756ead9560a76 (diff) | |
download | tor-3e2b48f8b4eee456c4aa81f640185382642fa75c.tar.gz tor-3e2b48f8b4eee456c4aa81f640185382642fa75c.zip |
Merge branch 'bug24484_squashed'
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index cea02b7daf..1540c40f9c 100644 --- a/configure.ac +++ b/configure.ac @@ -615,6 +615,21 @@ fi AM_CONDITIONAL(BUILD_READPASSPHRASE_C, test "x$ac_cv_func_readpassphrase" = "xno" && test "$bwin32" = "false") +AC_MSG_CHECKING([whether free(NULL) works]) +AC_RUN_IFELSE([AC_LANG_PROGRAM([ + #include <stdlib.h> +], [ +char *p = NULL; +free(p); +])], +[free_null_ok=true; AC_MSG_RESULT(yes)], +[free_null_ok=false; AC_MSG_RESULT(no)], +[free_null_ok=cross; AC_MSG_RESULT(cross)]) + +if test "$free_null_ok" = "false"; then + AC_MSG_ERROR([Your libc implementation doesn't allow free(NULL), as required by C99.]) +fi + dnl ------------------------------------------------------ dnl Where do you live, libevent? And how do we call you? |