public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r9-8926] libstdc++: Make C++17 ignore --disable-libstdcxx-filesystem-ts [PR 94681] Date: Mon, 21 Sep 2020 23:13:59 +0000 (GMT) [thread overview] Message-ID: <20200921231359.BC064386F026@sourceware.org> (raw) https://gcc.gnu.org/g:3ec14c9a49aa6c35609eaf04f74132e28a2dc9d5 commit r9-8926-g3ec14c9a49aa6c35609eaf04f74132e28a2dc9d5 Author: Jonathan Wakely <jwakely@redhat.com> Date: Mon Aug 10 13:21:59 2020 +0100 libstdc++: Make C++17 ignore --disable-libstdcxx-filesystem-ts [PR 94681] The configure switch should only affect the optional Filesystem TS, not the std::filesystem features of C++17. libstdc++-v3/ChangeLog: PR libstdc++/94681 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on $enable_libstdcxx_filesystem_ts. * configure: Regenerate. (cherry picked from commit 90f7636bf8df50940e0f749af60a6b374a8f09b4) Diff: --- libstdc++-v3/acinclude.m4 | 413 +++++++++++++++++++++++----------------------- libstdc++-v3/configure | 282 ++++++++++++++++--------------- 2 files changed, 346 insertions(+), 349 deletions(-) diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index d22e30230b3..93d86d2c363 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -4374,7 +4374,8 @@ AC_DEFUN([GLIBCXX_ENABLE_FILESYSTEM_TS], [ ]) dnl -dnl Check whether the library calls required by the Filesystem TS are present. +dnl Check whether the library calls required by the C++17 Filesystem library +dnl and the Filesystem TS are present. dnl Defines: dnl HAVE_STRUCT_DIRENT_D_TYPE dnl _GLIBCXX_USE_REALPATH @@ -4389,226 +4390,224 @@ dnl HAVE_SYMLINK dnl AC_DEFUN([GLIBCXX_CHECK_FILESYSTEM_DEPS], [dnl dnl - if test $enable_libstdcxx_filesystem_ts = yes; then - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -fno-exceptions" + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + 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(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) + 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(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( - [ - #include <limits.h> - #include <stdlib.h> - #include <unistd.h> - ], - [ - #if _XOPEN_VERSION < 500 - #error - #elif _XOPEN_VERSION >= 700 || defined(PATH_MAX) - char *tmp = realpath((const char*)NULL, (char*)NULL); - #else - #error - #endif - ], - [glibcxx_cv_realpath=yes], - [glibcxx_cv_realpath=no]) - ]) - if test $glibcxx_cv_realpath = yes; then - AC_DEFINE(_GLIBCXX_USE_REALPATH, 1, [Define if usable realpath is available in <stdlib.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_realpath) + AC_MSG_CHECKING([for realpath]) + AC_CACHE_VAL(glibcxx_cv_realpath, [dnl + GCC_TRY_COMPILE_OR_LINK( + [ + #include <limits.h> + #include <stdlib.h> + #include <unistd.h> + ], + [ + #if _XOPEN_VERSION < 500 + #error + #elif _XOPEN_VERSION >= 700 || defined(PATH_MAX) + char *tmp = realpath((const char*)NULL, (char*)NULL); + #else + #error + #endif + ], + [glibcxx_cv_realpath=yes], + [glibcxx_cv_realpath=no]) + ]) + if test $glibcxx_cv_realpath = yes; then + AC_DEFINE(_GLIBCXX_USE_REALPATH, 1, [Define if usable realpath is available in <stdlib.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_realpath) dnl - AC_MSG_CHECKING([for utimensat]) - AC_CACHE_VAL(glibcxx_cv_utimensat, [dnl - GCC_TRY_COMPILE_OR_LINK( - [ - #include <fcntl.h> - #include <sys/stat.h> - ], - [ - struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; - int i = utimensat(AT_FDCWD, "path", ts, 0); - ], - [glibcxx_cv_utimensat=yes], - [glibcxx_cv_utimensat=no]) - ]) - if test $glibcxx_cv_utimensat = yes; then - AC_DEFINE(_GLIBCXX_USE_UTIMENSAT, 1, [Define if utimensat and UTIME_OMIT are available in <sys/stat.h> and AT_FDCWD in <fcntl.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_utimensat) + AC_MSG_CHECKING([for utimensat]) + AC_CACHE_VAL(glibcxx_cv_utimensat, [dnl + GCC_TRY_COMPILE_OR_LINK( + [ + #include <fcntl.h> + #include <sys/stat.h> + ], + [ + struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; + int i = utimensat(AT_FDCWD, "path", ts, 0); + ], + [glibcxx_cv_utimensat=yes], + [glibcxx_cv_utimensat=no]) + ]) + if test $glibcxx_cv_utimensat = yes; then + AC_DEFINE(_GLIBCXX_USE_UTIMENSAT, 1, [Define if utimensat and UTIME_OMIT are available in <sys/stat.h> and AT_FDCWD in <fcntl.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_utimensat) dnl - AC_MSG_CHECKING([for utime]) - AC_CACHE_VAL(glibcxx_cv_utime, [dnl - GCC_TRY_COMPILE_OR_LINK( - [ - #include <utime.h> - ], - [ - struct utimbuf t = { 1, 1 }; - int i = utime("path", &t); - ], - [glibcxx_cv_utime=yes], - [glibcxx_cv_utime=no]) - ]) - if test $glibcxx_cv_utime = yes; then - AC_DEFINE(_GLIBCXX_USE_UTIME, 1, [Define if utime is available in <utime.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_utime) + AC_MSG_CHECKING([for utime]) + AC_CACHE_VAL(glibcxx_cv_utime, [dnl + GCC_TRY_COMPILE_OR_LINK( + [ + #include <utime.h> + ], + [ + struct utimbuf t = { 1, 1 }; + int i = utime("path", &t); + ], + [glibcxx_cv_utime=yes], + [glibcxx_cv_utime=no]) + ]) + if test $glibcxx_cv_utime = yes; then + AC_DEFINE(_GLIBCXX_USE_UTIME, 1, [Define if utime is available in <utime.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_utime) dnl - AC_MSG_CHECKING([for lstat]) - AC_CACHE_VAL(glibcxx_cv_lstat, [dnl - GCC_TRY_COMPILE_OR_LINK( - [ #include <sys/stat.h> ], - [ - struct stat st; - int i = lstat("path", &st); - ], - [glibcxx_cv_lstat=yes], - [glibcxx_cv_lstat=no]) - ]) - if test $glibcxx_cv_lstat = yes; then - AC_DEFINE(_GLIBCXX_USE_LSTAT, 1, [Define if lstat is available in <sys/stat.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_lstat) + AC_MSG_CHECKING([for lstat]) + AC_CACHE_VAL(glibcxx_cv_lstat, [dnl + GCC_TRY_COMPILE_OR_LINK( + [ #include <sys/stat.h> ], + [ + struct stat st; + int i = lstat("path", &st); + ], + [glibcxx_cv_lstat=yes], + [glibcxx_cv_lstat=no]) + ]) + if test $glibcxx_cv_lstat = yes; then + AC_DEFINE(_GLIBCXX_USE_LSTAT, 1, [Define if lstat is available in <sys/stat.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_lstat) dnl - AC_MSG_CHECKING([for struct stat.st_mtim.tv_nsec]) - AC_CACHE_VAL(glibcxx_cv_st_mtim, [dnl - GCC_TRY_COMPILE_OR_LINK( - [ #include <sys/stat.h> ], - [ - struct stat st; - return st.st_mtim.tv_nsec; - ], - [glibcxx_cv_st_mtim=yes], - [glibcxx_cv_st_mtim=no]) - ]) - if test $glibcxx_cv_st_mtim = yes; then - AC_DEFINE(_GLIBCXX_USE_ST_MTIM, 1, [Define if struct stat has timespec members.]) - fi - AC_MSG_RESULT($glibcxx_cv_st_mtim) + AC_MSG_CHECKING([for struct stat.st_mtim.tv_nsec]) + AC_CACHE_VAL(glibcxx_cv_st_mtim, [dnl + GCC_TRY_COMPILE_OR_LINK( + [ #include <sys/stat.h> ], + [ + struct stat st; + return st.st_mtim.tv_nsec; + ], + [glibcxx_cv_st_mtim=yes], + [glibcxx_cv_st_mtim=no]) + ]) + if test $glibcxx_cv_st_mtim = yes; then + AC_DEFINE(_GLIBCXX_USE_ST_MTIM, 1, [Define if struct stat has timespec members.]) + fi + AC_MSG_RESULT($glibcxx_cv_st_mtim) dnl - AC_MSG_CHECKING([for fchmod]) - AC_CACHE_VAL(glibcxx_cv_fchmod, [dnl - GCC_TRY_COMPILE_OR_LINK( - [#include <sys/stat.h>], - [fchmod(1, S_IWUSR);], - [glibcxx_cv_fchmod=yes], - [glibcxx_cv_fchmod=no]) - ]) - if test $glibcxx_cv_fchmod = yes; then - AC_DEFINE(_GLIBCXX_USE_FCHMOD, 1, [Define if fchmod is available in <sys/stat.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_fchmod) + AC_MSG_CHECKING([for fchmod]) + AC_CACHE_VAL(glibcxx_cv_fchmod, [dnl + GCC_TRY_COMPILE_OR_LINK( + [#include <sys/stat.h>], + [fchmod(1, S_IWUSR);], + [glibcxx_cv_fchmod=yes], + [glibcxx_cv_fchmod=no]) + ]) + if test $glibcxx_cv_fchmod = yes; then + AC_DEFINE(_GLIBCXX_USE_FCHMOD, 1, [Define if fchmod is available in <sys/stat.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_fchmod) 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 - AC_MSG_CHECKING([for sendfile that can copy files]) - AC_CACHE_VAL(glibcxx_cv_sendfile, [dnl - case "${target_os}" in - gnu* | linux* | solaris*) - GCC_TRY_COMPILE_OR_LINK( - [#include <sys/sendfile.h>], - [sendfile(1, 2, (off_t*)0, sizeof 1);], - [glibcxx_cv_sendfile=yes], - [glibcxx_cv_sendfile=no]) - ;; - *) - glibcxx_cv_sendfile=no - ;; - esac - ]) - if test $glibcxx_cv_sendfile = yes; then - AC_DEFINE(_GLIBCXX_USE_SENDFILE, 1, [Define if sendfile is available in <sys/sendfile.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_sendfile) + 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 - AC_MSG_CHECKING([for link]) - AC_CACHE_VAL(glibcxx_cv_link, [dnl - GCC_TRY_COMPILE_OR_LINK( - [#include <unistd.h>], - [link("", "");], - [glibcxx_cv_link=yes], - [glibcxx_cv_link=no]) - ]) - if test $glibcxx_cv_link = yes; then - AC_DEFINE(HAVE_LINK, 1, [Define if link is available in <unistd.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_link) + AC_MSG_CHECKING([for sendfile that can copy files]) + AC_CACHE_VAL(glibcxx_cv_sendfile, [dnl + case "${target_os}" in + gnu* | linux* | solaris*) + GCC_TRY_COMPILE_OR_LINK( + [#include <sys/sendfile.h>], + [sendfile(1, 2, (off_t*)0, sizeof 1);], + [glibcxx_cv_sendfile=yes], + [glibcxx_cv_sendfile=no]) + ;; + *) + glibcxx_cv_sendfile=no + ;; + esac + ]) + if test $glibcxx_cv_sendfile = yes; then + AC_DEFINE(_GLIBCXX_USE_SENDFILE, 1, [Define if sendfile is available in <sys/sendfile.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_sendfile) dnl - AC_MSG_CHECKING([for readlink]) - AC_CACHE_VAL(glibcxx_cv_readlink, [dnl - GCC_TRY_COMPILE_OR_LINK( - [#include <unistd.h>], - [char buf[32]; readlink("", buf, sizeof(buf));], - [glibcxx_cv_readlink=yes], - [glibcxx_cv_readlink=no]) - ]) - if test $glibcxx_cv_readlink = yes; then - AC_DEFINE(HAVE_READLINK, 1, [Define if readlink is available in <unistd.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_readlink) + AC_MSG_CHECKING([for link]) + AC_CACHE_VAL(glibcxx_cv_link, [dnl + GCC_TRY_COMPILE_OR_LINK( + [#include <unistd.h>], + [link("", "");], + [glibcxx_cv_link=yes], + [glibcxx_cv_link=no]) + ]) + if test $glibcxx_cv_link = yes; then + AC_DEFINE(HAVE_LINK, 1, [Define if link is available in <unistd.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_link) dnl - AC_MSG_CHECKING([for symlink]) - AC_CACHE_VAL(glibcxx_cv_symlink, [dnl - GCC_TRY_COMPILE_OR_LINK( - [#include <unistd.h>], - [symlink("", "");], - [glibcxx_cv_symlink=yes], - [glibcxx_cv_symlink=no]) - ]) - if test $glibcxx_cv_symlink = yes; then - AC_DEFINE(HAVE_SYMLINK, 1, [Define if symlink is available in <unistd.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_symlink) + AC_MSG_CHECKING([for readlink]) + AC_CACHE_VAL(glibcxx_cv_readlink, [dnl + GCC_TRY_COMPILE_OR_LINK( + [#include <unistd.h>], + [char buf[32]; readlink("", buf, sizeof(buf));], + [glibcxx_cv_readlink=yes], + [glibcxx_cv_readlink=no]) + ]) + if test $glibcxx_cv_readlink = yes; then + AC_DEFINE(HAVE_READLINK, 1, [Define if readlink is available in <unistd.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_readlink) dnl - AC_MSG_CHECKING([for truncate]) - AC_CACHE_VAL(glibcxx_cv_truncate, [dnl - GCC_TRY_COMPILE_OR_LINK( - [#include <unistd.h>], - [truncate("", 99);], - [glibcxx_cv_truncate=yes], - [glibcxx_cv_truncate=no]) - ]) - if test $glibcxx_cv_truncate = yes; then - AC_DEFINE(HAVE_TRUNCATE, 1, [Define if truncate is available in <unistd.h>.]) - fi - AC_MSG_RESULT($glibcxx_cv_truncate) + AC_MSG_CHECKING([for symlink]) + AC_CACHE_VAL(glibcxx_cv_symlink, [dnl + GCC_TRY_COMPILE_OR_LINK( + [#include <unistd.h>], + [symlink("", "");], + [glibcxx_cv_symlink=yes], + [glibcxx_cv_symlink=no]) + ]) + if test $glibcxx_cv_symlink = yes; then + AC_DEFINE(HAVE_SYMLINK, 1, [Define if symlink is available in <unistd.h>.]) + fi + AC_MSG_RESULT($glibcxx_cv_symlink) dnl - CXXFLAGS="$ac_save_CXXFLAGS" - AC_LANG_RESTORE + AC_MSG_CHECKING([for truncate]) + AC_CACHE_VAL(glibcxx_cv_truncate, [dnl + GCC_TRY_COMPILE_OR_LINK( + [#include <unistd.h>], + [truncate("", 99);], + [glibcxx_cv_truncate=yes], + [glibcxx_cv_truncate=no]) + ]) + if test $glibcxx_cv_truncate = yes; then + AC_DEFINE(HAVE_TRUNCATE, 1, [Define if truncate is available in <unistd.h>.]) fi + AC_MSG_RESULT($glibcxx_cv_truncate) +dnl + CXXFLAGS="$ac_save_CXXFLAGS" + AC_LANG_RESTORE ]) dnl diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 1225edc596b..86db10fbe75 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -80612,22 +80612,21 @@ $as_echo_n "checking whether to build Filesystem TS support... " >&6; } $as_echo "$enable_libstdcxx_filesystem_ts" >&6; } - if test $enable_libstdcxx_filesystem_ts = yes; then - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -fno-exceptions" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_type" >&5 + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -fno-exceptions" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_type" >&5 $as_echo_n "checking for struct dirent.d_type... " >&6; } - if ${glibcxx_cv_dirent_d_type+:} false; then : + if ${glibcxx_cv_dirent_d_type+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <dirent.h> @@ -80635,8 +80634,8 @@ int main () { - struct dirent d; - if (sizeof d.d_type) return 0; + struct dirent d; + if (sizeof d.d_type) return 0; ; return 0; @@ -80659,8 +80658,8 @@ int main () { - struct dirent d; - if (sizeof d.d_type) return 0; + struct dirent d; + if (sizeof d.d_type) return 0; ; return 0; @@ -80677,37 +80676,37 @@ fi fi - if test $glibcxx_cv_dirent_d_type = yes; then + if test $glibcxx_cv_dirent_d_type = yes; then $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_dirent_d_type" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_dirent_d_type" >&5 $as_echo "$glibcxx_cv_dirent_d_type" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for realpath" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for realpath" >&5 $as_echo_n "checking for realpath... " >&6; } - if ${glibcxx_cv_realpath+:} false; then : + if ${glibcxx_cv_realpath+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include <limits.h> - #include <stdlib.h> - #include <unistd.h> + #include <limits.h> + #include <stdlib.h> + #include <unistd.h> int main () { - #if _XOPEN_VERSION < 500 - #error - #elif _XOPEN_VERSION >= 700 || defined(PATH_MAX) - char *tmp = realpath((const char*)NULL, (char*)NULL); - #else - #error - #endif + #if _XOPEN_VERSION < 500 + #error + #elif _XOPEN_VERSION >= 700 || defined(PATH_MAX) + char *tmp = realpath((const char*)NULL, (char*)NULL); + #else + #error + #endif ; return 0; @@ -80726,21 +80725,21 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include <limits.h> - #include <stdlib.h> - #include <unistd.h> + #include <limits.h> + #include <stdlib.h> + #include <unistd.h> int main () { - #if _XOPEN_VERSION < 500 - #error - #elif _XOPEN_VERSION >= 700 || defined(PATH_MAX) - char *tmp = realpath((const char*)NULL, (char*)NULL); - #else - #error - #endif + #if _XOPEN_VERSION < 500 + #error + #elif _XOPEN_VERSION >= 700 || defined(PATH_MAX) + char *tmp = realpath((const char*)NULL, (char*)NULL); + #else + #error + #endif ; return 0; @@ -80757,31 +80756,31 @@ fi fi - if test $glibcxx_cv_realpath = yes; then + if test $glibcxx_cv_realpath = yes; then $as_echo "#define _GLIBCXX_USE_REALPATH 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_realpath" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_realpath" >&5 $as_echo "$glibcxx_cv_realpath" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimensat" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimensat" >&5 $as_echo_n "checking for utimensat... " >&6; } - if ${glibcxx_cv_utimensat+:} false; then : + if ${glibcxx_cv_utimensat+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + 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> + #include <fcntl.h> + #include <sys/stat.h> int main () { - struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; - int i = utimensat(AT_FDCWD, "path", ts, 0); + struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; + int i = utimensat(AT_FDCWD, "path", ts, 0); ; return 0; @@ -80800,15 +80799,15 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include <fcntl.h> - #include <sys/stat.h> + #include <fcntl.h> + #include <sys/stat.h> int main () { - struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; - int i = utimensat(AT_FDCWD, "path", ts, 0); + struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; + int i = utimensat(AT_FDCWD, "path", ts, 0); ; return 0; @@ -80825,30 +80824,30 @@ fi fi - if test $glibcxx_cv_utimensat = yes; then + if test $glibcxx_cv_utimensat = yes; then $as_echo "#define _GLIBCXX_USE_UTIMENSAT 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utimensat" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utimensat" >&5 $as_echo "$glibcxx_cv_utimensat" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utime" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utime" >&5 $as_echo_n "checking for utime... " >&6; } - if ${glibcxx_cv_utime+:} false; then : + if ${glibcxx_cv_utime+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include <utime.h> + #include <utime.h> int main () { - struct utimbuf t = { 1, 1 }; - int i = utime("path", &t); + struct utimbuf t = { 1, 1 }; + int i = utime("path", &t); ; return 0; @@ -80867,14 +80866,14 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include <utime.h> + #include <utime.h> int main () { - struct utimbuf t = { 1, 1 }; - int i = utime("path", &t); + struct utimbuf t = { 1, 1 }; + int i = utime("path", &t); ; return 0; @@ -80891,19 +80890,19 @@ fi fi - if test $glibcxx_cv_utime = yes; then + if test $glibcxx_cv_utime = yes; then $as_echo "#define _GLIBCXX_USE_UTIME 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utime" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utime" >&5 $as_echo "$glibcxx_cv_utime" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5 $as_echo_n "checking for lstat... " >&6; } - if ${glibcxx_cv_lstat+:} false; then : + if ${glibcxx_cv_lstat+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/stat.h> @@ -80911,8 +80910,8 @@ int main () { - struct stat st; - int i = lstat("path", &st); + struct stat st; + int i = lstat("path", &st); ; return 0; @@ -80935,8 +80934,8 @@ int main () { - struct stat st; - int i = lstat("path", &st); + struct stat st; + int i = lstat("path", &st); ; return 0; @@ -80953,19 +80952,19 @@ fi fi - if test $glibcxx_cv_lstat = yes; then + if test $glibcxx_cv_lstat = yes; then $as_echo "#define _GLIBCXX_USE_LSTAT 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_lstat" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_lstat" >&5 $as_echo "$glibcxx_cv_lstat" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat.st_mtim.tv_nsec" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat.st_mtim.tv_nsec" >&5 $as_echo_n "checking for struct stat.st_mtim.tv_nsec... " >&6; } - if ${glibcxx_cv_st_mtim+:} false; then : + if ${glibcxx_cv_st_mtim+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/stat.h> @@ -80973,8 +80972,8 @@ int main () { - struct stat st; - return st.st_mtim.tv_nsec; + struct stat st; + return st.st_mtim.tv_nsec; ; return 0; @@ -80997,8 +80996,8 @@ int main () { - struct stat st; - return st.st_mtim.tv_nsec; + struct stat st; + return st.st_mtim.tv_nsec; ; return 0; @@ -81015,19 +81014,19 @@ fi fi - if test $glibcxx_cv_st_mtim = yes; then + if test $glibcxx_cv_st_mtim = yes; then $as_echo "#define _GLIBCXX_USE_ST_MTIM 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_st_mtim" >&5 + 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 fchmod" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmod" >&5 $as_echo_n "checking for fchmod... " >&6; } - if ${glibcxx_cv_fchmod+:} false; then : + if ${glibcxx_cv_fchmod+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/stat.h> @@ -81071,24 +81070,24 @@ fi fi - if test $glibcxx_cv_fchmod = yes; then + if test $glibcxx_cv_fchmod = yes; then $as_echo "#define _GLIBCXX_USE_FCHMOD 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmod" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmod" >&5 $as_echo "$glibcxx_cv_fchmod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmodat" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmodat" >&5 $as_echo_n "checking for fchmodat... " >&6; } - if ${glibcxx_cv_fchmodat+:} false; then : + if ${glibcxx_cv_fchmodat+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + 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> + #include <fcntl.h> + #include <sys/stat.h> int main () @@ -81111,8 +81110,8 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include <fcntl.h> - #include <sys/stat.h> + #include <fcntl.h> + #include <sys/stat.h> int main () @@ -81133,21 +81132,21 @@ fi fi - if test $glibcxx_cv_fchmodat = yes; then + 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 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmodat" >&5 $as_echo "$glibcxx_cv_fchmodat" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile that can copy files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile that can copy files" >&5 $as_echo_n "checking for sendfile that can copy files... " >&6; } - if ${glibcxx_cv_sendfile+:} false; then : + if ${glibcxx_cv_sendfile+:} false; then : $as_echo_n "(cached) " >&6 else - case "${target_os}" in - gnu* | linux* | solaris*) - if test x$gcc_no_link = xyes; then + case "${target_os}" in + gnu* | linux* | solaris*) + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/sendfile.h> @@ -81188,27 +81187,27 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi - ;; - *) - glibcxx_cv_sendfile=no - ;; - esac + ;; + *) + glibcxx_cv_sendfile=no + ;; + esac fi - if test $glibcxx_cv_sendfile = yes; then + if test $glibcxx_cv_sendfile = yes; then $as_echo "#define _GLIBCXX_USE_SENDFILE 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sendfile" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sendfile" >&5 $as_echo "$glibcxx_cv_sendfile" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 $as_echo_n "checking for link... " >&6; } - if ${glibcxx_cv_link+:} false; then : + if ${glibcxx_cv_link+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> @@ -81252,19 +81251,19 @@ fi fi - if test $glibcxx_cv_link = yes; then + if test $glibcxx_cv_link = yes; then $as_echo "#define HAVE_LINK 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_link" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_link" >&5 $as_echo "$glibcxx_cv_link" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readlink" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readlink" >&5 $as_echo_n "checking for readlink... " >&6; } - if ${glibcxx_cv_readlink+:} false; then : + if ${glibcxx_cv_readlink+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> @@ -81308,19 +81307,19 @@ fi fi - if test $glibcxx_cv_readlink = yes; then + if test $glibcxx_cv_readlink = yes; then $as_echo "#define HAVE_READLINK 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_readlink" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_readlink" >&5 $as_echo "$glibcxx_cv_readlink" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 $as_echo_n "checking for symlink... " >&6; } - if ${glibcxx_cv_symlink+:} false; then : + if ${glibcxx_cv_symlink+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> @@ -81364,19 +81363,19 @@ fi fi - if test $glibcxx_cv_symlink = yes; then + if test $glibcxx_cv_symlink = yes; then $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_symlink" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_symlink" >&5 $as_echo "$glibcxx_cv_symlink" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for truncate" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for truncate" >&5 $as_echo_n "checking for truncate... " >&6; } - if ${glibcxx_cv_truncate+:} false; then : + if ${glibcxx_cv_truncate+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_no_link = xyes; then + if test x$gcc_no_link = xyes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> @@ -81420,21 +81419,20 @@ fi fi - if test $glibcxx_cv_truncate = yes; then + if test $glibcxx_cv_truncate = yes; then $as_echo "#define HAVE_TRUNCATE 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_truncate" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_truncate" >&5 $as_echo "$glibcxx_cv_truncate" >&6; } - CXXFLAGS="$ac_save_CXXFLAGS" - ac_ext=c + CXXFLAGS="$ac_save_CXXFLAGS" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - fi # For Networking TS.
reply other threads:[~2020-09-21 23:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200921231359.BC064386F026@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).