aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config.h.in
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-10-04 16:08:23 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-10-04 16:08:23 +0100
commit2fc115875e063ec6eb2af2a9634e018a83ffa3b6 (patch)
treedf5ab1d61a4cd3d7e0eac3081e9b7f27bc6146e9 /libstdc++-v3/config.h.in
parent0a789c10e91ec8c8f021f72f7df6045d019e5538 (diff)
downloadgcc-2fc115875e063ec6eb2af2a9634e018a83ffa3b6.zip
gcc-2fc115875e063ec6eb2af2a9634e018a83ffa3b6.tar.gz
gcc-2fc115875e063ec6eb2af2a9634e018a83ffa3b6.tar.bz2
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. From-SVN: r276585
Diffstat (limited to 'libstdc++-v3/config.h.in')
-rw-r--r--libstdc++-v3/config.h.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 3d13402..32f7863 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -803,6 +803,14 @@
/* Version number of package */
#undef VERSION
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
/* Define if C99 functions in <complex.h> should be used in <complex> for
C++11. Using compiler builtins for these functions requires corresponding
C99 library functions to be present. */
@@ -1047,6 +1055,9 @@
/* Define to 1 if mutex_timedlock is available. */
#undef _GTHREAD_USE_MUTEX_TIMEDLOCK
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
/* Define if all C++11 floating point overloads are available in <math.h>. */
#if __cplusplus >= 201103L
#undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP