From: Eric Sunshine Date: Mon, 9 Apr 2018 08:50:42 +0000 (-0400) Subject: configure.ac: fix botched FREAD_READS_DIRECTORIES check X-Git-Tag: v2.18.0-rc0~115^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=249482daf0ee2612022775fc8c549b06eb9f567b;p=git configure.ac: fix botched FREAD_READS_DIRECTORIES check 3adf9fdecf (configure.ac: loosen FREAD_READS_DIRECTORIES test program, 2017-06-14) broke the test program for the FREAD_READS_DIRECTORIES check by making it syntactically invalid (a dangling ")") and by botching the type returned from 'main' (a FILE* rather than int). As a consequence, the test program won't even compile, thus the check fails unconditionally. Fix these problems. Reported-by: Jonathan Primrose Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- diff --git a/configure.ac b/configure.ac index ceeb9de575..e33b6c79c0 100644 --- a/configure.ac +++ b/configure.ac @@ -867,7 +867,7 @@ AC_RUN_IFELSE( [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ FILE *f = fopen(".", "r"); - return f)]])], + return f != NULL;]])], [ac_cv_fread_reads_directories=no], [ac_cv_fread_reads_directories=yes]) ])