Commit 0b9fc9fe by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/66018 (opendir configure test not working when GCC_NO_EXECUTABLES)

	PR libstdc++/66018
	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for struct
	dirent.d_type.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (AC_STRUCT_DIRENT_D_TYPE): Remove.

From-SVN: r223194
parent 3aa3c9fc
2015-05-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/66018
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for struct
dirent.d_type.
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac (AC_STRUCT_DIRENT_D_TYPE): Remove.
2015-05-13 Eric Botcazou <ebotcazou@adacore.com>
* acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete.
......
......@@ -3875,6 +3875,22 @@ dnl
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-exceptions"
dnl
AC_MSG_CHECKING([for struct dirent.d_type])
AC_CACHE_VAL(glibcxx_cv_dirent_d_type, [dnl
GCC_TRY_COMPILE_OR_LINK(
[#include <dirent.h>],
[
struct dirent d;
if (sizeof d.d_type) return 0;
],
[glibcxx_cv_dirent_d_type=yes],
[glibcxx_cv_dirent_d_type=no])
])
if test $glibcxx_cv_dirent_d_type = yes; then
AC_DEFINE(_GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE, 1, [Define to 1 if `d_type' is a member of `struct dirent'.])
fi
AC_MSG_RESULT($glibcxx_cv_dirent_d_type)
dnl
AC_MSG_CHECKING([for realpath])
AC_CACHE_VAL(glibcxx_cv_realpath, [dnl
GCC_TRY_COMPILE_OR_LINK(
......
......@@ -54,8 +54,7 @@
/* Define to 1 if you have the `cosl' function. */
#undef HAVE_COSL
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define to 1 if you have the <dlfcn.h> header file. */
......@@ -301,9 +300,6 @@
/* Define to 1 if you have the <nan.h> header file. */
#undef HAVE_NAN_H
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
/* Define if poll is available in <poll.h>. */
#undef HAVE_POLL
......@@ -382,9 +378,6 @@
/* Define to 1 if you have the `strtold' function. */
#undef HAVE_STRTOLD
/* Define to 1 if `struct dirent' is a member of `d_type'. */
#undef HAVE_STRUCT_DIRENT_D_TYPE
/* Define if strxfrm_l is available in <string.h>. */
#undef HAVE_STRXFRM_L
......@@ -392,10 +385,6 @@
to different versions. */
#undef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
......@@ -411,10 +400,6 @@
/* Define to 1 if you have the <sys/machine.h> header file. */
#undef HAVE_SYS_MACHINE_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
......@@ -753,6 +738,9 @@
/* Define if gthreads library is available. */
#undef _GLIBCXX_HAS_GTHREADS
/* Define to 1 if `d_type' is a member of `struct dirent'. */
#undef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE
/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
#undef _GLIBCXX_HOSTED
......
......@@ -403,7 +403,6 @@ GLIBCXX_CHECK_GTHREADS
# For Filesystem TS.
AC_CHECK_HEADERS([fcntl.h dirent.h sys/statvfs.h utime.h])
AC_STRUCT_DIRENT_D_TYPE
GLIBCXX_ENABLE_FILESYSTEM_TS
GLIBCXX_CHECK_FILESYSTEM_DEPS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment