diff mbox

Backport all Filesystem library fixes from trunk

Message ID 20161212180444.GN6326@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely Dec. 12, 2016, 6:04 p.m. UTC
On 12/12/16 14:09 +0000, Jonathan Wakely wrote:
>This syncs the std::experimental::filesystem code on gcc-6-branch to

>match what's on trunk, except that the C++17 std::string_view type

>doesn't exist on the branch, so the filesystem::path type only

>supports experimental::string_view.

>

>I'm doing it as one big patch, rather than backporting 26 individual

>patches.


[snip]

>Tested x86_64-linux, committed to gcc-6-branch.

>

>I'll backport most of this to gcc-5-branch too, I think the gcc-6

>patch should apply cleanly, but I'll need to adjust the tests to not

>use { dg-do action { target c++11 } } as that's only on trunk and

>gcc-6-branch.


I missed these two fixes for the configure tests for Filesystem.

Committed to gcc-6-branch, will commit to 5 once testing completes.

Somehow I managed to commit a load of duplicate ChangeLog entries in
the commits from r243569 to r243574. Git-svn went crazy. I've cleaned
that up now.
diff mbox

Patch

commit 00c16d2d9e7e985ca3d43e19ae78e6613588fa4a
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Dec 12 16:46:49 2016 +0000

    Add missing header in Filesystem TS configure tests
    
    Backport from mainline
    2016-10-26  Uros Bizjak  <ubizjak@gmail.com>
    
    	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Include <limits.h>
    	for PATH_MAX in realpath test.
    	* configure: Regenerate.

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 4b951d8..ce44a6a 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -4343,6 +4343,7 @@  dnl
   AC_CACHE_VAL(glibcxx_cv_realpath, [dnl
     GCC_TRY_COMPILE_OR_LINK(
       [
+       #include <limits.h>
        #include <stdlib.h>
        #include <unistd.h>
       ],

commit dbe360643e28f6efe2f5d296784fee9eab849b54
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed May 25 16:13:52 2016 +0000

    Fix configure test for sendfile()
    
    	Backport from mainline
    	2016-05-25  Jonathan Wakely  <jwakely@redhat.com>
    
    	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Fix test for sendfile.
    	* configure: Regenerate.
    	* config.h.in: Regenerate.

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index c453145..4b951d8 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -4433,7 +4433,7 @@  dnl
       gnu* | linux* | solaris*)
         GCC_TRY_COMPILE_OR_LINK(
           [#include <sys/sendfile.h>],
-          [sendfile(1, 2, (off_t*)NULL, sizeof 1);],
+          [sendfile(1, 2, (off_t*)0, sizeof 1);],
           [glibcxx_cv_sendfile=yes],
           [glibcxx_cv_sendfile=no])
         ;;
@@ -4443,7 +4443,7 @@  dnl
     esac
   ])
   if test $glibcxx_cv_sendfile = yes; then
-    AC_DEFINE(_GLIBCXX_USE_SENDFILE, 1, [Define if sendfile is available in <sys/stat.h>.])
+    AC_DEFINE(_GLIBCXX_USE_SENDFILE, 1, [Define if sendfile is available in <sys/sendfile.h>.])
   fi
   AC_MSG_RESULT($glibcxx_cv_sendfile)
 dnl