Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: [PATCH] Support for large files on 32bit systems.

From: Martin Waitz <hidden>
Date: 2016-06-15 22:42:55
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

hoi :)

On Sat, Feb 17, 2007 at 04:49:59AM -0500, Shawn O. Pearce wrote:
I think the only way to do with this is to have the Makefile detect
if -D_FILE_OFFSET_BITS=64 is required to be added to CFLAGS based on
some rule (e.g. uname output?), then add that to CFLAGS when needed.
something like this?

(I'm just testing it with a large data transfer, which will take some
time..., will report success later)

+++
Support for large files on 32bit systems.

Glibc uses the same size for int and off_t by default.
In order to support large pack sizes (>2GB) we force Glibc to a 64bit off_t.

Signed-off-by: Martin Waitz <redacted>
---
 Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index ebecbbd..325c19f 100644
--- a/Makefile
+++ b/Makefile
@@ -334,9 +334,11 @@ EXTLIBS = -lz
 
 ifeq ($(uname_S),Linux)
 	NO_STRLCPY = YesPlease
+	BASIC_CFLAGS = -D_FILE_OFFSET_BITS=64
 endif
 ifeq ($(uname_S),GNU/kFreeBSD)
 	NO_STRLCPY = YesPlease
+	BASIC_CFLAGS = -D_FILE_OFFSET_BITS=64
 endif
 ifeq ($(uname_S),Darwin)
 	NEEDS_SSL_WITH_CRYPTO = YesPlease
-- 
1.5.0.80.g42d14


-- 
Martin Waitz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help