Module Name: othersrc
Committed By: lukem
Date: Sun Jul 5 10:55:48 UTC 2020
Modified Files:
othersrc/usr.bin/tnftp: configure tnftp_config.h.in
Log Message:
regen for conditional glob replacement
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 othersrc/usr.bin/tnftp/configure
cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/tnftp/tnftp_config.h.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/usr.bin/tnftp/configure
diff -u othersrc/usr.bin/tnftp/configure:1.50 othersrc/usr.bin/tnftp/configure:1.51
--- othersrc/usr.bin/tnftp/configure:1.50 Sun Jul 5 10:19:31 2020
+++ othersrc/usr.bin/tnftp/configure Sun Jul 5 10:55:48 2020
@@ -3220,6 +3220,7 @@ fi
+
#
# Checks for programs.
#
@@ -14347,14 +14348,50 @@ _ACEOF
fi
-# Always replace glob(); the vendor's may not be secure.
+# Use system glob if GLOB_BRACE and GLOB_TILDE are available.
#
-case " $LIBOBJS " in
+use_local_glob=yes
+ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
+if test "x$ac_cv_header_glob_h" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking glob supports required extensions" >&5
+$as_echo_n "checking glob supports required extensions... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <glob.h>
+int
+main ()
+{
+
+int f = GLOB_BRACE | GLOB_TILDE;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ use_local_glob=no
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - using local version" >&5
+$as_echo "no - using local version" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+if test "$use_local_glob" = yes; then :
+ case " $LIBOBJS " in
*" glob.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS glob.$ac_objext"
;;
esac
+else
+ $as_echo "#define USE_GLOB_H 1" >>confdefs.h
+
+fi
# We assume that if sprintf() supports %lld or %qd,
# then all of *printf() does. If not, disable long long
Index: othersrc/usr.bin/tnftp/tnftp_config.h.in
diff -u othersrc/usr.bin/tnftp/tnftp_config.h.in:1.7 othersrc/usr.bin/tnftp/tnftp_config.h.in:1.8
--- othersrc/usr.bin/tnftp/tnftp_config.h.in:1.7 Sun Jul 5 10:19:31 2020
+++ othersrc/usr.bin/tnftp/tnftp_config.h.in Sun Jul 5 10:55:48 2020
@@ -470,6 +470,9 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
+/* Define if using system <glob.h> instead of local glob. */
+#undef USE_GLOB_H
+
/* Define if using IPv6 support. */
#undef USE_INET6