Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:55
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Nicolas Pitre [off-list ref] writes:
quoted
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.
Why not simply defining _FILE_OFFSET_BITS=64 unconditionally?

It certainly won't cause GIT to explode if compiled against something 
else than glibc.
I like the simplicity of that approach.  Like this?
diff --git a/git-compat-util.h b/git-compat-util.h
index 105ac28..dd5f369 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -1,6 +1,8 @@
 #ifndef GIT_COMPAT_UTIL_H
 #define GIT_COMPAT_UTIL_H
 
+#define _FILE_OFFSET_BITS 64
+
 #ifndef FLEX_ARRAY
 #if defined(__GNUC__) && (__GNUC__ < 3)
 #define FLEX_ARRAY 0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help