From a1cc0b3290dcf1b5cf759c89352d8bdb44ee41e6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 22 Apr 2011 16:21:26 -0700 Subject: [PATCH] Fix 32-bit MAXOFFSET_T definition Having MAXOFFSET_T defined to 0x7fffffffl was artificially limiting the maximum file size on 32-bit systems. In reality MAXOFFSET_T is used when working with 'long long' types and as such we now define it as LLONG_MAX. This resolves the 2GB file size limit for files and additionally allows zvols greater than 2GB on 32-bit systems. Closes #136 Closes #81 --- lib/libspl/include/sys/param.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/libspl/include/sys/param.h b/lib/libspl/include/sys/param.h index d9e7782..3efb56e 100644 --- a/lib/libspl/include/sys/param.h +++ b/lib/libspl/include/sys/param.h @@ -47,13 +47,8 @@ #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ -#define MAXNAMELEN 256 - -#ifdef _LP64 -#define MAXOFFSET_T 0x7fffffffffffffffl -#else -#define MAXOFFSET_T 0x7fffffffl -#endif +#define MAXNAMELEN 256 +#define MAXOFFSET_T LLONG_MAX #define UID_NOBODY 60001 /* user ID no body */ #define GID_NOBODY UID_NOBODY -- 1.8.3.1