[llvm] r187839 - Check for _strtoi64 in the cmake build if strtoll is missing
Reid Kleckner
reid at kleckner.net
Tue Aug 6 17:29:16 PDT 2013
Author: rnk
Date: Tue Aug 6 19:29:15 2013
New Revision: 187839
URL: http://llvm.org/viewvc/llvm-project?rev=187839&view=rev
Log:
Check for _strtoi64 in the cmake build if strtoll is missing
Previously this check was guarded by MSVC, which doesn't distinguish
between the compiler and the headers/library. This enables clang to
compile more of LLVM on Windows with Microsoft headers.
Remove some unused macros while I'm here: error_t and LTDL stuff.
Modified:
llvm/trunk/cmake/config-ix.cmake
llvm/trunk/include/llvm/Config/config.h.cmake
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=187839&r1=187838&r2=187839&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Tue Aug 6 19:29:15 2013
@@ -214,7 +214,6 @@ endif()
check_type_exists(int64_t "${headers}" HAVE_INT64_T)
check_type_exists(uint64_t "${headers}" HAVE_UINT64_T)
check_type_exists(u_int64_t "${headers}" HAVE_U_INT64_T)
-check_type_exists(error_t errno.h HAVE_ERROR_T)
# available programs checks
function(llvm_find_program name)
@@ -392,20 +391,20 @@ if( MINGW )
# CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP)
endif( MINGW )
+if (NOT HAVE_STRTOLL)
+ # Use _strtoi64 if strtoll is not available.
+ check_symbol_exists(_strtoi64 stdlib.h have_strtoi64)
+ if (have_strtoi64)
+ set(HAVE_STRTOLL 1)
+ set(strtoll "_strtoi64")
+ set(strtoull "_strtoui64")
+ endif ()
+endif ()
+
if( MSVC )
- set(error_t int)
- set(LTDL_SYSSEARCHPATH "")
- set(LTDL_DLOPEN_DEPLIBS 1)
set(SHLIBEXT ".lib")
- set(LTDL_OBJDIR "_libs")
- set(HAVE_STRTOLL 1)
- set(strtoll "_strtoi64")
- set(strtoull "_strtoui64")
set(stricmp "_stricmp")
set(strdup "_strdup")
-else( MSVC )
- set(LTDL_SYSSEARCHPATH "") # TODO
- set(LTDL_DLOPEN_DEPLIBS 0) # TODO
endif( MSVC )
if( PURE_WINDOWS )
Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=187839&r1=187838&r2=187839&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Tue Aug 6 19:29:15 2013
@@ -653,9 +653,6 @@
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#cmakedefine error_t ${error_t}
-
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
More information about the llvm-commits
mailing list