[Bug libstdc++/81091] libstdc++ not built with large file support

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 4 15:09:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81091

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Oct  4 15:08:23 2019
New Revision: 276585

URL: https://gcc.gnu.org/viewcvs?rev=276585&root=gcc&view=rev
Log:
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).

        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.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/config.h.in
    trunk/libstdc++-v3/configure
    trunk/libstdc++-v3/configure.ac
    trunk/libstdc++-v3/include/Makefile.am
    trunk/libstdc++-v3/include/Makefile.in
    trunk/libstdc++-v3/src/c++17/fs_dir.cc
    trunk/libstdc++-v3/src/c++17/fs_ops.cc
    trunk/libstdc++-v3/src/filesystem/dir.cc
    trunk/libstdc++-v3/src/filesystem/ops.cc


More information about the Gcc-bugs mailing list