about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-08-14 21:03:42 -0700
committerEric Wong <normalperson@yhbt.net>2009-08-15 02:38:47 -0700
commit0aad9def275bff7a73532b77d44101df7338f053 (patch)
treebd5c808bacaf1c9652cf69aa41ba5a391f7bdf68
parent6096fc8d0c5e61a4342d5ccd0ff9df0213e8c062 (diff)
downloadunicorn-0aad9def275bff7a73532b77d44101df7338f053.tar.gz
We need to declare constants for 64-bit off_t explicitly with
the "LL" suffix on 32-bit machines.
-rw-r--r--ext/unicorn_http/c_util.h6
1 files changed, 5 insertions, 1 deletions
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