*-*-darwin*)
use_pie=auto
AC_MSG_CHECKING([if we have working getaddrinfo])
- AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <mach-o/dyld.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <mach-o/dyld.h>
+#include <stdlib.h>
main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
exit(0);
else
esac
AC_MSG_CHECKING([compiler and flags for sanity])
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])],
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdlib.h> ]], [[ exit(0); ]])],
[ AC_MSG_RESULT([yes]) ],
[
AC_MSG_RESULT([no])
[AC_LANG_SOURCE([[
#include <libgen.h>
#include <string.h>
+#include <stdlib.h>
int main(int argc, char **argv) {
char *s, buf[32];
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <sys/types.h>
-#include <dirent.h>]],
+#include <dirent.h>
+#include <stdlib.h>
+ ]],
[[
struct dirent d;
exit(sizeof(d.d_name)<=sizeof(char));
)
AC_MSG_CHECKING([if libedit version is compatible])
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[ #include <histedit.h> ]],
+ [AC_LANG_PROGRAM([[
+#include <histedit.h>
+#include <stdlib.h>
+ ]],
[[
int i = H_SETSIZE;
el_init("", NULL, NULL, NULL);
AC_MSG_CHECKING([for working fflush(NULL)])
AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])],
+ [AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <stdlib.h>
+ ]],
+ [[fflush(NULL); exit(0);]])],
AC_MSG_RESULT([yes]),
[AC_MSG_RESULT([no])
AC_DEFINE([FFLUSH_NULL_BUG], [1],
if test "x$ac_cv_func_snprintf" = "xyes" ; then
AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([[ #include <stdio.h> ]],
+ [AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <stdlib.h>
+ ]],
[[
char b[5];
snprintf(b,5,"123456789");
[AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
]],
[[
size_t a = 1, b = 2;
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdlib.h>
+#include <unistd.h>
]], [[
char template[]="conftest.mkstemp-test";
if (mkstemp(template) == -1)
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
#include <sys/fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
+#include <stdlib.h>
#include <sys/socket.h>
#include <netdb.h>
#include <errno.h>
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
+#include <stdlib.h>
#include <sys/socket.h>
#include <netdb.h>
#include <errno.h>
if test "x$check_for_conflicting_getspnam" = "x1"; then
AC_MSG_CHECKING([for conflicting getspnam in shadow.h])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <shadow.h> ]],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <shadow.h>
+#include <stdlib.h>
+ ]],
[[ exit(0); ]])],
[
AC_MSG_RESULT([no])
#include <signal.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <vis.h>
static void sighandler(int sig) { _exit(1); }
]], [[
#include <sys/time.h>
#include <stdlib.h>
#include <signal.h>
+#include <unistd.h>
static void sighandler(int sig) { }
]], [[
int r;
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
+ #include <stdlib.h>
#include <string.h>
#include <openssl/opensslv.h>
#include <openssl/crypto.h>
AC_MSG_CHECKING([whether OpenSSL's headers match the library])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
+ #include <stdlib.h>
#include <string.h>
#include <openssl/opensslv.h>
#include <openssl/crypto.h>
AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
+ #include <stdlib.h>
#include <string.h>
#include <openssl/evp.h>
]], [[
AC_MSG_CHECKING([whether OpenSSL has AES CTR via EVP])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
+ #include <stdlib.h>
#include <string.h>
#include <openssl/evp.h>
]], [[
AC_MSG_CHECKING([whether OpenSSL has AES GCM via EVP])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
+ #include <stdlib.h>
#include <string.h>
#include <openssl/evp.h>
]], [[
AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
+ #include <stdlib.h>
#include <string.h>
#include <openssl/evp.h>
]], [[
AC_MSG_CHECKING([if OpenSSL's NID_secp521r1 is functional])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
+ #include <stdlib.h>
#include <openssl/ec.h>
#include <openssl/ecdh.h>
#include <openssl/ecdsa.h>
AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
+ #include <stdlib.h>
#include <string.h>
#include <openssl/rand.h>
]], [[
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
+#include <stdlib.h>
/* Why is this so damn hard? */
#ifdef __GNUC__
# undef __GNUC__
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SNPRINTF
main()
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
+#include <stdlib.h>
]], [[
#ifdef msg_accrights
#error "msg_accrights is a macro"
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
+#include <stdlib.h>
]], [[
#ifdef msg_control
#error "msg_control is a macro"
fi
AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
[[ extern char *__progname; printf("%s", __progname); ]])],
[ ac_cv_libc_defines___progname="yes" ],
[ ac_cv_libc_defines___progname="no"
fi
AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
[[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])],
[ ac_cv_libc_defines_sys_errlist="yes" ],
[ ac_cv_libc_defines_sys_errlist="no"
AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
[[ extern int sys_nerr; printf("%i", sys_nerr);]])],
[ ac_cv_libc_defines_sys_nerr="yes" ],
[ ac_cv_libc_defines_sys_nerr="no"
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
[AC_LANG_PROGRAM([[
/* find out what STDPATH is */
#include <stdio.h>
+#include <stdlib.h>
#ifdef HAVE_PATHS_H
# include <paths.h>
#endif