summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-22 21:15:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-22 21:15:20 (GMT)
commitdf7fd961a9d9ba60840ffc0868d36cc3db2aec74 (patch)
tree3f5090d591b2308f553a9ee3764eb004c2dd0218
parent05ec6e13aaf33b6a647e1321203a770e697eea9a (diff)
parent3adf9fdecfb0cd31a83ef3af1d8d631a1acd392b (diff)
downloadgit-df7fd961a9d9ba60840ffc0868d36cc3db2aec74.zip
git-df7fd961a9d9ba60840ffc0868d36cc3db2aec74.tar.gz
git-df7fd961a9d9ba60840ffc0868d36cc3db2aec74.tar.bz2
Merge branch 'nd/fopen-errors'
Hotfix for a topic that is already in 'master'. * nd/fopen-errors: configure.ac: loosen FREAD_READS_DIRECTORIES test program
-rw-r--r--Makefile3
-rw-r--r--configure.ac4
2 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f484801..b94cd56 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,8 @@ all::
# have been written to the final string if enough space had been available.
#
# Define FREAD_READS_DIRECTORIES if you are on a system which succeeds
-# when attempting to read from an fopen'ed directory.
+# when attempting to read from an fopen'ed directory (or even to fopen
+# it at all).
#
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
# This also implies BLK_SHA1.
diff --git a/configure.ac b/configure.ac
index 11d083f..2f55237 100644
--- a/configure.ac
+++ b/configure.ac
@@ -922,9 +922,9 @@ AC_CACHE_CHECK([whether system succeeds to read fopen'ed directory],
[
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
- [[char c;
+ [[
FILE *f = fopen(".", "r");
- return f && fread(&c, 1, 1, f)]])],
+ return f)]])],
[ac_cv_fread_reads_directories=no],
[ac_cv_fread_reads_directories=yes])
])