aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-13 03:05:00 +0000
committerYang Tse <yangsita@gmail.com>2008-08-13 03:05:00 +0000
commit55a8098d489a9755c192caab662dcc3f01dcfb67 (patch)
tree40bcedd90322a6e9def226d53b3f50ae2ab05ca3 /src/main.c
parent389e50ff1eb5eaa5a83ee20d8bdf42c5cb6ffadc (diff)
Adjustment due to curl_off_t no longer following off_t
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/main.c b/src/main.c
index 5b6fef738..584f7dfb5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1387,21 +1387,13 @@ static int str2num(long *val, const char *str)
*/
static int str2offset(curl_off_t *val, const char *str)
{
-#if CURL_SIZEOF_CURL_OFF_T > 4
+#if (CURL_SIZEOF_CURL_OFF_T > SIZEOF_LONG)
/* Ugly, but without going through a bunch of rigmarole, we don't have the
* definitions for LLONG_{MIN,MAX} or LONG_LONG_{MIN,MAX}.
*/
#ifndef LLONG_MAX
-#if defined(_MSC_VER)
-#define LLONG_MAX (curl_off_t)0x7FFFFFFFFFFFFFFFi64
-#define LLONG_MIN (curl_off_t)0x8000000000000000i64
-#elif defined(_CRAYC)
-#define LLONG_MAX (curl_off_t)0x7FFFFFFFFFFFFFFF
-#define LLONG_MIN (curl_off_t)0x8000000000000000
-#else
-#define LLONG_MAX (curl_off_t)0x7FFFFFFFFFFFFFFFLL
-#define LLONG_MIN (curl_off_t)0x8000000000000000LL
-#endif
+# define LLONG_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF)
+# define LLONG_MIN CURL_OFF_T_C(0x8000000000000000)
#endif
/* this is a duplicate of the function that is also used in libcurl */