aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-14 03:39:45 +0000
committerYang Tse <yangsita@gmail.com>2008-08-14 03:39:45 +0000
commitcebaab8ee557f2024e04e584da113b589b19d2bb (patch)
tree013b80b691d5d1d16c6527ccf642be091f566272 /src/main.c
parent34281925d69110345ccddea20fa4a99881fe25cb (diff)
Use our CURL_LLONG_MAX and CURL_LLONG_MIN which are defined with the proper suffix.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/main.c b/src/main.c
index 948fd6756..b70219189 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1388,20 +1388,8 @@ static int str2num(long *val, const char *str)
static int str2offset(curl_off_t *val, const char *str)
{
#if (CURL_SIZEOF_CURL_OFF_T > CURL_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
-# 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 */
*val = curlx_strtoofft(str, NULL, 0);
-
- if( ( (*val == LLONG_MAX) ||
- (*val == LLONG_MIN) ) &&
- (ERRNO == ERANGE) )
+ if((*val == CURL_LLONG_MAX || *val == CURL_LLONG_MIN) && (ERRNO == ERANGE))
return 1;
#else
*val = strtol(str, NULL, 0);