diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-03-05 19:28:08 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-03-05 19:28:08 +1100 |
commit | 58fd4c5c0140f6636227ca7acbb149ab0c2509b9 (patch) | |
tree | 51a79fa23c4140148ba59f9c43107fedefe9bbae /configure.ac | |
parent | 71e48bc7945f867029e50e06c665c66aed6d3c64 (diff) |
Check for and work around buggy fflush(NULL).
Some really old platforms (eg SunOS4) segfault on fflush(NULL) so check
for and work around. With klausz at haus-gisela.de.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 70e72be77..d2fb4469c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -2059,6 +2059,16 @@ AC_CHECK_FUNCS([realpath], [ | |||
2059 | ) | 2059 | ) |
2060 | ]) | 2060 | ]) |
2061 | 2061 | ||
2062 | AC_MSG_CHECKING([for working fflush(NULL)]) | ||
2063 | AC_RUN_IFELSE( | ||
2064 | [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])], | ||
2065 | AC_MSG_RESULT([yes]), | ||
2066 | [AC_MSG_RESULT([no]) | ||
2067 | AC_DEFINE([FFLUSH_NULL_BUG], [1], | ||
2068 | [define if fflush(NULL) does not work])], | ||
2069 | AC_MSG_WARN([cross compiling: assuming working]) | ||
2070 | ) | ||
2071 | |||
2062 | dnl Checks for time functions | 2072 | dnl Checks for time functions |
2063 | AC_CHECK_FUNCS([gettimeofday time]) | 2073 | AC_CHECK_FUNCS([gettimeofday time]) |
2064 | dnl Checks for utmp functions | 2074 | dnl Checks for utmp functions |