diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-01 19:48:00 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-01 19:48:00 +0000 |
commit | e16e2d2c4f222095f5b9daeae1d97858ec425165 (patch) | |
tree | 0bc46ce80de16433e21de47fde04f7ea8d6ff0b4 /libstdc++-v3/acinclude.m4 | |
parent | d1eff9deca0ca0dfd0f1482ff1dab5970c49d9d7 (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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222703 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 9d8d96d7465..07b5bd70ab3 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -3914,6 +3914,9 @@ AC_DEFUN([GLIBCXX_ENABLE_FILESYSTEM_TS], [ [permit yes|no|auto]) AC_MSG_CHECKING([whether to build Filesystem TS support]) + 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*) @@ -3993,6 +3996,22 @@ dnl fi AC_MSG_RESULT($glibcxx_cv_st_mtim) dnl + AC_MSG_CHECKING([for fchmodat]) + AC_CACHE_VAL(glibcxx_cv_fchmodat, [dnl + GCC_TRY_COMPILE_OR_LINK( + [ + #include <fcntl.h> + #include <sys/stat.h> + ], + [fchmodat(AT_FDCWD, "", 0, AT_SYMLINK_NOFOLLOW);], + [glibcxx_cv_fchmodat=yes], + [glibcxx_cv_fchmodat=no]) + ]) + if test $glibcxx_cv_fchmodat = yes; then + AC_DEFINE(_GLIBCXX_USE_FCHMODAT, 1, [Define if fchmodat is available in <sys/stat.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_fchmodat) +dnl CXXFLAGS="$ac_save_CXXFLAGS" AC_LANG_RESTORE ]) |