summaryrefslogtreecommitdiffstats
path: root/Source/CTest/Curl
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-07 21:48:36 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-07 21:48:36 (GMT)
commitfbaead2a09e70c7bf6deaf86c536caedccb26792 (patch)
tree79e749368c2fc2b4204bc5063ab1b2c73490d406 /Source/CTest/Curl
parente46b0a9290808c5680cf817e96064bd2a0000556 (diff)
downloadCMake-fbaead2a09e70c7bf6deaf86c536caedccb26792.zip
CMake-fbaead2a09e70c7bf6deaf86c536caedccb26792.tar.gz
CMake-fbaead2a09e70c7bf6deaf86c536caedccb26792.tar.bz2
COMP: Remove warning about assigning 0x8000000000000000L to long long
Diffstat (limited to 'Source/CTest/Curl')
-rw-r--r--Source/CTest/Curl/CMake/CurlTests.c12
-rw-r--r--Source/CTest/Curl/CMakeLists.txt1
-rw-r--r--Source/CTest/Curl/config.h.in3
-rw-r--r--Source/CTest/Curl/strtoofft.c7
4 files changed, 23 insertions, 0 deletions
diff --git a/Source/CTest/Curl/CMake/CurlTests.c b/Source/CTest/Curl/CMake/CurlTests.c
index fed3894..61278ea 100644
--- a/Source/CTest/Curl/CMake/CurlTests.c
+++ b/Source/CTest/Curl/CMake/CurlTests.c
@@ -521,3 +521,15 @@ main () {
return 0;
}
#endif
+#ifdef HAVE_LONG_LONG_CONSTANT
+int main()
+{
+ long long c = 0x8000000000000000LL;
+ long long k = 0x7FFFFFFFFFFFFFFFLL;
+ if ( c == 0x8000000000000000LL && c != k )
+ {
+ return 0;
+ }
+ return 1;
+}
+#endif
diff --git a/Source/CTest/Curl/CMakeLists.txt b/Source/CTest/Curl/CMakeLists.txt
index 3b252fd..2cfc761 100644
--- a/Source/CTest/Curl/CMakeLists.txt
+++ b/Source/CTest/Curl/CMakeLists.txt
@@ -446,6 +446,7 @@ ENDIF(HAVE_FILE_OFFSET_BITS)
FOREACH(CURL_TEST
HAVE_GLIBC_STRERROR_R
HAVE_POSIX_STRERROR_R
+ HAVE_LONG_LONG_CONSTANT
)
CURL_INTERNAL_TEST_RUN(${CURL_TEST})
ENDFOREACH(CURL_TEST)
diff --git a/Source/CTest/Curl/config.h.in b/Source/CTest/Curl/config.h.in
index 5b554cc..c5fe652 100644
--- a/Source/CTest/Curl/config.h.in
+++ b/Source/CTest/Curl/config.h.in
@@ -504,3 +504,6 @@
/* the signed version of size_t */
#cmakedefine ssize_t ${ssize_t}
+
+/* define if the compiler supports number 0x3627676LL */
+#cmakedefine HAVE_LONG_LONG_CONSTANT ${HAVE_LONG_LONG_CONSTANT}
diff --git a/Source/CTest/Curl/strtoofft.c b/Source/CTest/Curl/strtoofft.c
index 1bcfb1a..e2b02c4 100644
--- a/Source/CTest/Curl/strtoofft.c
+++ b/Source/CTest/Curl/strtoofft.c
@@ -111,10 +111,17 @@ curlx_strtoll(const char *nptr, char **endptr, int base)
}
}
else {
+#ifdef HAVE_LONG_LONG_CONSTANT
+ if (is_negative)
+ value = 0x8000000000000000LL;
+ else
+ value = 0x7FFFFFFFFFFFFFFFLL;
+#else
if (is_negative)
value = 0x8000000000000000L;
else
value = 0x7FFFFFFFFFFFFFFFL;
+#endif
errno = ERANGE;
}