]> 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)
committerEvan Hunt <each@isc.org>
Sat, 9 Mar 2019 00:43:28 +0000 (16:43 -0800)
(cherry picked from commit 7eea756858bd50547f3f5e4764adf3a2c7e095ff)

config.h.in
configure
configure.ac
lib/isc/lex.c

index dd6598aa984120abd6685aa5dfa90f95beaaa8b9..6434b126469ded2c03eaa76a078ef5572691cd0c 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
+
 /* Build with GeoIP support */
 #undef HAVE_GEOIP
 
 /* 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 851f7203ab25ce26814ec25ce01d6b6d0f70e909..4c97c8c48ffae8f2482e3123e8ea4fbee2c6f801 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 34af113a3f637cbc7f1cfaa5a0beaf84775d703e..d090484f7fcaecf520ce533addbd1875868fdfcd 100644 (file)
@@ -665,6 +665,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 dce944b6ca98ca18b1f35690e5f2feb8b4807a2b..ca5fe6d160bf1739e5a4d471fd2a382b8578c29f 100644 (file)
@@ -433,7 +433,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);