git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <junkio@cox.net>
Date
Feb 19, 2007, 02:44 UTC
Message-ID
<7vr6smc1de.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<alpine.LRH.0.82.0702170830280.31945@xanadu.home>
Nicolas Pitre <nico@cam.org> writes:
Show 8 quoted lines
>> 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
Previous: Nicolas Pitre
Message 6 of 6 in “Support for large files on 32bit systems.”
  1. Support for large files on 32bit systems.Martin Waitz, Feb 17, 2007
  2. Martin WaitzFeb 17, 2007
  3. Shawn O. PearceFeb 17, 2007
  4. Martin WaitzFeb 17, 2007
  5. Nicolas PitreFeb 17, 2007
  6. Junio C HamanoFeb 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.