]> gcc.gnu.org Git - gcc.git/commit
Build filesystem library with large file support
authorJonathan Wakely <jwakely@redhat.com>
Thu, 9 Jan 2020 13:38:43 +0000 (13:38 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 17 Sep 2020 15:39:47 +0000 (17:39 +0200)
commite82acdcb56a07b94fcc2e159fee61396d01c9e3d
tree65cab5a1284477e358afcd7a37d4abd37d4e5d2f
parent6f94c63526ae844f9d8d2b527c1d732540a87194
Build filesystem library with large file support

Enable AC_SYS_LARGEFILE to set the macros needed for large file APIs to
be used by default. We do not want to define those macros in the
public headers that users include. The values of the macros are copied
to a separate file that is only included by the filesystem sources
during the build, and then the macros in <bits/c++config.h> are renamed
so that they don't have any effect in user code including our headers.

Also use larger type for result of filesystem::file_size to avoid
truncation of large values on 32-bit systems (PR 91947).

Backport from mainlne
2019-10-04  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/81091
PR libstdc++/91947
* configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
* config.h.in: Regenerate:
* configure: Regenerate:
* include/Makefile.am (${host_builddir}/largefile-config.h): New
target to generate config header for filesystem library.
(${host_builddir}/c++config.h): Rename macros for large file support.
* include/Makefile.in: Regenerate.
* src/c++17/fs_dir.cc: Include new config header.
* src/c++17/fs_ops.cc: Likewise.
(filesystem::file_size): Use uintmax_t for size.
* src/filesystem/dir.cc: Include new config header.
* src/filesystem/ops.cc: Likewise.
(experimental::filesystem::file_size): Use uintmax_t for size.
libstdc++-v3/ChangeLog
libstdc++-v3/config.h.in
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/src/filesystem/dir.cc
libstdc++-v3/src/filesystem/ops.cc
libstdc++-v3/src/filesystem/std-dir.cc
libstdc++-v3/src/filesystem/std-ops.cc
This page took 0.064625 seconds and 6 git commands to generate.