From 0aad9def275bff7a73532b77d44101df7338f053 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 14 Aug 2009 21:03:42 -0700 Subject: http: fix warning when sizeof(off_t) == sizeof(long long) We need to declare constants for 64-bit off_t explicitly with the "LL" suffix on 32-bit machines. --- ext/unicorn_http/c_util.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/unicorn_http/c_util.h b/ext/unicorn_http/c_util.h index 1c085ae..04fd05d 100644 --- a/ext/unicorn_http/c_util.h +++ b/ext/unicorn_http/c_util.h @@ -20,7 +20,11 @@ #if SIZEOF_OFF_T == 4 # define UH_OFF_T_MAX 0x7fffffff #elif SIZEOF_OFF_T == 8 -# define UH_OFF_T_MAX 0x7fffffffffffffff +# if SIZEOF_LONG == 4 +# define UH_OFF_T_MAX 0x7fffffffffffffffLL +# else +# define UH_OFF_T_MAX 0x7fffffffffffffff +# endif #else # error off_t size unknown for this platform! #endif -- cgit v1.2.3-24-ge0c7