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