dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FDOPENDIR],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_DEFUN([gl_FUNC_FDOPENDIR],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-]], [int fd = open ("conftest.h", O_RDONLY);
+#if !HAVE_DECL_FDOPENDIR
+extern DIR *fdopendir (int);
+#endif
+]], [int fd = open ("conftest.c", O_RDONLY);
if (fd < 0) return 2;
return !!fdopendir (fd);])],
[gl_cv_func_fdopendir_works=yes],
if (fd < 0) return 2;
return !!fdopendir (fd);])],
[gl_cv_func_fdopendir_works=yes],