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

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

From
Martin Waitz <tali@admingilde.org>
Date
Feb 17, 2007, 10:46 UTC
Message-ID
<20070217104632.GF21842@admingilde.org>
In-Reply-To
<20070217094959.GH27864@spearce.org>
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 <tali@admingilde.org>
---
 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
Previous: Shawn O. PearceNext: Nicolas Pitre
Message 4 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.