Hello,

There is a strange bug in MS Visual Studio 2010 for x64 compiler: while it readily accepts 'ULL' as a valid suffix for unsigned long long literals,
it rejects 'LLU'.
The bug is strange because both 'ULL' and 'LLU' suffixes are okay for the 32-bit compiler that comes along with the x64 one.

Other compilers (GCC, Intel ICC) accept both forms.

Please find attached a small patch that enables compiling libcurl with MS VS x64 Compiler.

--
Regards,
Tetetest.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88dd1ee..2580ec5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -436,7 +436,8 @@ if(SIZEOF_LONG_LONG EQUAL 8)
   set(CURL_FORMAT_CURL_OFF_TU "llu")
   set(CURL_FORMAT_OFF_T "%lld")
   set(CURL_SUFFIX_CURL_OFF_T LL)
-  set(CURL_SUFFIX_CURL_OFF_TU LLU)
+  # NB: MS Visual Studio x64 Compiler does not recognize "LLU" as valid suffix.
+  set(CURL_SUFFIX_CURL_OFF_TU ULL)
 endif(SIZEOF_LONG_LONG EQUAL 8)
 
 if(NOT CURL_TYPEOF_CURL_OFF_T)
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to