diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2007-03-15 19:22:15 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2007-03-15 19:22:15 (GMT) |
commit | 9314bb49e09b323f1c889d95448ca5dd0a42cc61 (patch) | |
tree | 72c7e4477ba67281ddc446e8cccad11e1b46e408 /Utilities/cmcurl/strtoofft.h | |
parent | f52d37c26f5fd48cc745b85c3233848d7b664368 (diff) | |
download | CMake-9314bb49e09b323f1c889d95448ca5dd0a42cc61.zip CMake-9314bb49e09b323f1c889d95448ca5dd0a42cc61.tar.gz CMake-9314bb49e09b323f1c889d95448ca5dd0a42cc61.tar.bz2 |
ENH: Update Curl to 7.16.1
Diffstat (limited to 'Utilities/cmcurl/strtoofft.h')
-rw-r--r-- | Utilities/cmcurl/strtoofft.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/Utilities/cmcurl/strtoofft.h b/Utilities/cmcurl/strtoofft.h index 4c5d265..e27b432 100644 --- a/Utilities/cmcurl/strtoofft.h +++ b/Utilities/cmcurl/strtoofft.h @@ -1,10 +1,10 @@ #ifndef _CURL_STRTOOFFT_H #define _CURL_STRTOOFFT_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al. @@ -12,7 +12,7 @@ * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://curl.haxx.se/docs/copyright.html. - * + * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. @@ -38,7 +38,7 @@ * not, should try to emulate its functionality. At any rate, we define * 'strtoofft' such that it can be used to work with curl_off_t's regardless. */ -#if SIZEOF_CURL_OFF_T > 4 +#if (SIZEOF_CURL_OFF_T > 4) && (SIZEOF_LONG < 8) #if HAVE_STRTOLL #define curlx_strtoofft strtoll #else /* HAVE_STRTOLL */ @@ -53,10 +53,21 @@ curl_off_t curlx_strtoll(const char *nptr, char **endptr, int base); #endif /* MSVC7 or later */ #endif /* HAVE_STRTOLL */ -#else /* SIZEOF_CURL_OFF_T > 4 */ -/* simply use strtol() to get 32bit numbers */ +#else /* (SIZEOF_CURL_OFF_T > 4) && (SIZEOF_LONG < 8) */ +/* simply use strtol() to get numbers, either 32 or 64 bit */ #define curlx_strtoofft strtol #endif +#if defined(_MSC_VER) || defined(__WATCOMC__) +#define CURL_LLONG_MIN 0x8000000000000000i64 +#define CURL_LLONG_MAX 0x7FFFFFFFFFFFFFFFi64 +#elif defined(HAVE_LL) +#define CURL_LLONG_MIN 0x8000000000000000LL +#define CURL_LLONG_MAX 0x7FFFFFFFFFFFFFFFLL +#else +#define CURL_LLONG_MIN 0x8000000000000000L +#define CURL_LLONG_MAX 0x7FFFFFFFFFFFFFFFL +#endif + #endif |