diff options
author | Werner Koch <[email protected]> | 2017-10-04 16:03:54 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-10-04 16:03:54 +0000 |
commit | 4632adf403611b50be2b4e852a4607070935d0e5 (patch) | |
tree | b576f31962affbdb3d53106deeba629a61024ebf /configure.ac | |
parent | core: Restore get_max_fds optimization on Linux (diff) | |
download | gpgme-4632adf403611b50be2b4e852a4607070935d0e5.tar.gz gpgme-4632adf403611b50be2b4e852a4607070935d0e5.zip |
core: Allow disabling the use of SYS_getdents for Linux.
* configure.ac (USE_LINUX_GETDENTS): New ac_define. Add option
--disable-linux-getdents.
* src/posix-io.c: Make use of USE_LINUX_GETDENTS.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 12843170..68593574 100644 --- a/configure.ac +++ b/configure.ac @@ -762,7 +762,28 @@ fi AM_CONDITIONAL(HAVE_UISERVER, test "$uiserver" != "no") +# Option --disable-linux-getdents +# +# By default we use SYS_getdents on Linux to optimize fd closing +# before an exec. This option allows to switch this optimization off. +use_linux_getdents=yes +AC_ARG_ENABLE(linux-getdents, + AC_HELP_STRING([--disable-linux-getdents], + [do not use SYS_getdents on Linux]), + use_linux_getdents=$enableval) +if test "$use_linux_getdents" = "yes"; then + case "${host}" in + *-*-linux*) + AC_DEFINE(USE_LINUX_GETDENTS,1, + [Defined if SYS_getdents can be used on Linux]) + ;; + esac +fi + + +# # Add a few constants to help porting to W32 +# AH_VERBATIM([SEPCONSTANTS], [ /* Separators as used in $PATH and file name. */ |