From 73e946f5304a053c37286891c66c5ef99f9d76e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 23 Oct 2016 20:06:30 +0300 Subject: [PATCH] compat: fix test for tree functions The standard functions are tdelete, tfind, tsearch and twalk. Testing for non-standard tdestroy does not work properly: it leads to false negative. --- compat/{tdestroy.c => tfind.c} | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename compat/{tdestroy.c => tfind.c} (99%) diff --git a/compat/tdestroy.c b/compat/tfind.c similarity index 99% rename from compat/tdestroy.c rename to compat/tfind.c index 63d3ddfe37..804ecb8e43 100644 --- a/compat/tdestroy.c +++ b/compat/tfind.c @@ -1,5 +1,5 @@ /***************************************************************************** - * tdestroy.c : implement every t* fuctions + * tfind.c : implement every t* fuctions *****************************************************************************/ #ifdef HAVE_CONFIG_H diff --git a/configure.ac b/configure.ac index 900286c179..98c209deee 100644 --- a/configure.ac +++ b/configure.ac @@ -599,7 +599,7 @@ need_libc=false dnl Check for usual libc functions AC_CHECK_DECLS([nanosleep],,,[#include ]) AC_CHECK_FUNCS([daemon fcntl flock fstatvfs fork getenv getpwuid_r isatty lstat memalign mkostemp mmap open_memstream openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale pthread_cond_timedwait_monotonic_np pthread_condattr_setclock]) -AC_REPLACE_FUNCS([atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lldiv memrchr nrand48 poll posix_memalign recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy timegm timespec_get strverscmp]) +AC_REPLACE_FUNCS([atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lldiv memrchr nrand48 poll posix_memalign recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tfind timegm timespec_get strverscmp]) AC_REPLACE_FUNCS([gettimeofday]) AC_CHECK_FUNC(fdatasync,, [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])