aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2015-05-01 19:48:00 +0000
committerJonathan Wakely <jwakely@redhat.com>2015-05-01 19:48:00 +0000
commita6d0beb7ef977cb57fa33e61c75f97d3355c51f9 (patch)
tree0bc46ce80de16433e21de47fde04f7ea8d6ff0b4 /libstdc++-v3/configure
parent9d76fbcc9eac6ad572c9e22cde032108c3f2394f (diff)
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable when <dirent.h>
is not available. (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for fchmodat. * configure: Regenerate. * config.h.in: Regenerate. * configure.ac: Check for utime.h * include/experimental/fs_path.h (path::string<>) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove stray typename keyword. * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H] (DIR, opendir, closedir, dirent, readdir_r): Replace dummy functions with #error. (native_readdir, _Dir::advance): Use readdir when readdir_r is missing. * src/filesystem/ops.cc (do_stat, is_set): Make inline. (last_write_time) [!_GLIBCXX_USE_UTIMENSAT]: Use utime. (permissions) [!_GLIBCXX_USE_FCHMODAT]: Use chmod. (space, temp_directory_path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Set error_code. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@222703 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure67
1 files changed, 66 insertions, 1 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 5ecfdebbaaf..90a5192db80 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -78928,7 +78928,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# For Filesystem TS.
-for ac_header in fcntl.h dirent.h sys/statvfs.h
+for ac_header in fcntl.h dirent.h sys/statvfs.h utime.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -79154,6 +79154,9 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Filesystem TS support" >&5
$as_echo_n "checking whether to build Filesystem TS support... " >&6; }
+ if test x"$ac_cv_header_dirent_h" != x"yes"; then
+ enable_libstdcxx_filesystem_ts=no
+ fi
if test x"$enable_libstdcxx_filesystem_ts" = x"auto"; then
case "${target_os}" in
freebsd*|netbsd*|openbsd*|dragonfly*|darwin*)
@@ -79369,6 +79372,68 @@ $as_echo "#define _GLIBCXX_USE_ST_MTIM 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_st_mtim" >&5
$as_echo "$glibcxx_cv_st_mtim" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmodat" >&5
+$as_echo_n "checking for fchmodat... " >&6; }
+ if test "${glibcxx_cv_fchmodat+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <fcntl.h>
+ #include <sys/stat.h>
+
+int
+main ()
+{
+fchmodat(AT_FDCWD, "", 0, AT_SYMLINK_NOFOLLOW);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_fchmodat=yes
+else
+ glibcxx_cv_fchmodat=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <fcntl.h>
+ #include <sys/stat.h>
+
+int
+main ()
+{
+fchmodat(AT_FDCWD, "", 0, AT_SYMLINK_NOFOLLOW);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_fchmodat=yes
+else
+ glibcxx_cv_fchmodat=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ if test $glibcxx_cv_fchmodat = yes; then
+
+$as_echo "#define _GLIBCXX_USE_FCHMODAT 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmodat" >&5
+$as_echo "$glibcxx_cv_fchmodat" >&6; }
CXXFLAGS="$ac_save_CXXFLAGS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'