]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Restore missing check for flockfile and getc_unlocked
authorOndřej Surý <ondrej@sury.org>
Thu, 7 Mar 2019 12:32:30 +0000 (13:32 +0100)
committerOndřej Surý <ondrej@sury.org>
Fri, 8 Mar 2019 20:20:20 +0000 (21:20 +0100)
config.h.in
configure
configure.ac
lib/isc/lex.c

index 9221657aad84c4493af27023b3842d5f37707356..7ab55513902c84941ae8cfb4253f9db9378d6969 100644 (file)
 /* Define to 1 if you have the `FIPS_mode' function. */
 #undef HAVE_FIPS_MODE
 
+/* Define to 1 if you have the `flockfile' function. */
+#undef HAVE_FLOCKFILE
+
 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
 #undef HAVE_FSEEKO
 
 /* Build with GeoIP Country IPv6 support */
 #undef HAVE_GEOIP_V6
 
+/* Define to 1 if you have the `getc_unlocked' function. */
+#undef HAVE_GETC_UNLOCKED
+
 /* Define to 1 if you have the `getpassphrase' function. */
 #undef HAVE_GETPASSPHRASE
 
index 90bf56198180adbc3888572d9389d5dd07d27c0c..7c93b2e8599fa3d1cb6d660aba3deee761a2c58d 100755 (executable)
--- a/configure
+++ b/configure
 done
 
 
+#
+# flockfile is usually provided by pthreads
+#
+for ac_func in flockfile getc_unlocked
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
 #
 # Look for sysconf to allow detection of the number of processors.
 #
index c11824bfa79ec21240e6c8c28d0f6f572641a9fc..89d212fc0bf158bbe52f1e29d12123c6eebb1f7a 100644 (file)
@@ -675,6 +675,11 @@ AC_CHECK_FUNCS([pthread_setaffinity_np cpuset_setaffinity processor_bind sched_s
 AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np])
 AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
 
+#
+# flockfile is usually provided by pthreads
+#
+AC_CHECK_FUNCS([flockfile getc_unlocked])
+
 #
 # Look for sysconf to allow detection of the number of processors.
 #
index ed24a7ec83511683287dde7de5d554786d51e990..fbf0036ca89ac7ee92f5b2b1d82a035b194b2e28 100644 (file)
@@ -431,7 +431,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                        if (source->is_file) {
                                stream = source->input;
 
-#if defined(HAVE_FLOCKFILE) && defined(HAVE_GETCUNLOCKED)
+#if defined(HAVE_FLOCKFILE) && defined(HAVE_GETC_UNLOCKED)
                                c = getc_unlocked(stream);
 #else
                                c = getc(stream);