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

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

From
Martin Waitz <tali@admingilde.org>
Date
Feb 17, 2007, 09:13 UTC
Message-ID
<20070217091310.GD21842@admingilde.org>

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>
---
 git-compat-util.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index bf3ceb8..38f9594 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -19,6 +19,11 @@
 #define _GNU_SOURCE 1
 #define _BSD_SOURCE 1
 
+/* support large files even on 32bit systems */
+#ifdef __GLIBC__
+#define _FILE_OFFSET_BITS=64
+#endif
+
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/stat.h>
-- 
1.5.0.rc2.g08361-dirty

-- 
Martin Waitz
Next: Martin Waitz
Message 1 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.