aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config.h.in
diff options
context:
space:
mode:
authorJannik Glückert <jannik.glueckert@gmail.com>2023-03-06 20:52:08 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-06-06 12:31:57 +0100
commitf80a8b42296265bb868a48592a2bd1fdaa2a3d8a (patch)
tree40054d92f4a3a9d0b5c2ece3bd68124a0006f62d /libstdc++-v3/config.h.in
parentc4deccd44655c5d748dfed200a37f2b678c32fe8 (diff)
downloadgcc-f80a8b42296265bb868a48592a2bd1fdaa2a3d8a.zip
gcc-f80a8b42296265bb868a48592a2bd1fdaa2a3d8a.tar.gz
gcc-f80a8b42296265bb868a48592a2bd1fdaa2a3d8a.tar.bz2
libstdc++: Also use sendfile for big files
We were previously only using sendfile for files smaller than 2GB, as sendfile needs to be called repeatedly for files bigger than that. Some quick numbers, copying a 16GB file, average of 10 repetitions: old: real: 13.4s user: 0.14s sys : 7.43s new: real: 8.90s user: 0.00s sys : 3.68s libstdc++-v3/ChangeLog: * acinclude.m4 (_GLIBCXX_HAVE_LSEEK): Define. * config.h.in: Regenerate. * configure: Regenerate. * src/filesystem/ops-common.h (copy_file_sendfile): Define new function for sendfile logic. Loop to support large files. Skip zero-length files. (do_copy_file): Use it. Signed-off-by: Jannik Glückert <jannik.glueckert@gmail.com>
Diffstat (limited to 'libstdc++-v3/config.h.in')
-rw-r--r--libstdc++-v3/config.h.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 5a95853..99ce682 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -254,6 +254,9 @@
/* Define to 1 if you have the `logl' function. */
#undef HAVE_LOGL
+/* Define if lseek is available in <unistd.h>. */
+#undef HAVE_LSEEK
+
/* Define to 1 if you have the <machine/endian.h> header file. */
#undef HAVE_MACHINE_ENDIAN_H