summaryrefslogtreecommitdiff
path: root/m4/readdir.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/readdir.m4')
-rw-r--r--m4/readdir.m48
1 files changed, 7 insertions, 1 deletions
diff --git a/m4/readdir.m4 b/m4/readdir.m4
index 0a78739b3c..81337e2ffa 100644
--- a/m4/readdir.m4
+++ b/m4/readdir.m4
@@ -1,4 +1,4 @@
-# readdir.m4 serial 1
+# readdir.m4 serial 2
dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,5 +11,11 @@ AC_DEFUN([gl_FUNC_READDIR],
AC_CHECK_FUNCS([readdir])
if test $ac_cv_func_readdir = no; then
HAVE_READDIR=0
+ else
+ dnl Replace readdir() on native Windows, to support fdopendir().
+ AC_REQUIRE([gl_DIRENT_DIR])
+ if test $DIR_HAS_FD_MEMBER = 0; then
+ REPLACE_READDIR=1
+ fi
fi
])