]> 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)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 13 Jan 2020 18:51:22 +0000 (18:51 +0000)
commit6cb662745d38e680a1a46fa04b108734cbc3df58
treee3280dd22d32427eb6492c1a2aff7aff566db189
parent5b6c608019153e3dbb03e3f5f7b7a1768727f987
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/c++17/fs_dir.cc
libstdc++-v3/src/c++17/fs_ops.cc
libstdc++-v3/src/filesystem/dir.cc
libstdc++-v3/src/filesystem/ops.cc
This page took 0.062788 seconds and 6 git commands to generate.