We provide everything (headers, libraries, executables...), so tell it to cmake
[CRT]
The crt library must provide a and w version of the functions and not rely to _UNICODE being set or not

svn path=/branches/cmake-bringup/; revision=51273
This commit is contained in:
Jérôme Gardou 2011-04-07 14:11:36 +00:00
parent 3793b7fdf1
commit 04fa57f360
2 changed files with 10 additions and 7 deletions

View file

@ -69,8 +69,8 @@ else()
# search headers and libraries in the target environment, search # search headers and libraries in the target environment, search
# programs in the host environment # programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
# Do some cleanup # Do some cleanup
file(REMOVE file(REMOVE

View file

@ -1,14 +1,17 @@
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdlib.h> #include <stdlib.h>
#include <tchar.h>
/* /*
* @implemented * @implemented
*/ */
long long atol(const char *str)
_ttol(const _TCHAR *str)
{ {
return (long)_ttoi64(str); return (long)_atoi64(str);
}
long _wtol(const wchar_t *str)
{
return (long)_wtoi64(str);
} }
int _atoldbl(_LDOUBLE *value, char *str) int _atoldbl(_LDOUBLE *value, char *str)
@ -16,4 +19,4 @@ int _atoldbl(_LDOUBLE *value, char *str)
/* FIXME needs error checking for huge/small values */ /* FIXME needs error checking for huge/small values */
//*value = strtold(str,0); //*value = strtold(str,0);
return -1; return -1;
} }