diff options
author | Guillem Jover <guillem@hadrons.org> | 2011-12-31 08:39:44 +0100 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2012-05-29 04:36:23 +0200 |
commit | 943939d0e57257c83a8113102eb9e9703963cc5c (patch) | |
tree | a4ed1c70f6230e425f4ceb853a108cb21d367b52 /configure.ac | |
parent | 3d614131b598e52b34c487866dae4853df5ec86a (diff) |
Add new closefrom() function
Code taken from sudo, man page from FreeBSD.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ab7f96a..ce697a3 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,7 @@ AC_PROG_LN_S # Checks for libraries. # Checks for header files. +AC_CHECK_HEADERS([sys/ndir.h sys/dir.h dir.h dirent.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_UID_T @@ -36,6 +37,13 @@ AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T +AC_CHECK_DECL([F_CLOSEM], + [AC_DEFINE([HAVE_FCNTL_CLOSEM], [1], + [Define to 1 if you have fcntl(F_CLOSEM)])], + [], + [#include <limits.h> + #include <fcntl.h>]) + # Checks for library functions. AC_MSG_CHECKING([for __progname]) AC_LINK_IFELSE( @@ -46,7 +54,7 @@ AC_LINK_IFELSE( AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) -AC_CHECK_FUNCS([getexecname]) +AC_CHECK_FUNCS([dirfd getexecname sysconf]) AC_CONFIG_FILES([ Makefile |