Author: akhaldi
Date: Sat Aug 14 10:41:24 2010
New Revision: 48541
URL:
http://svn.reactos.org/svn/reactos?rev=48541&view=rev
Log:
[CMAKE]
- Sync the recent crt changes from trunk.
- Improve crt build.
Modified:
branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt
branches/cmake-bringup/lib/sdk/crt/locale/locale.c
Modified: branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/CMake…
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt [iso-8859-1] Sat Aug 14 10:41:24
2010
@@ -4,10 +4,66 @@
add_definitions(-D_CRTBLD)
file(GLOB_RECURSE CRT_SOURCE "*.c")
-LIST(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/stdio/findgen.c)
-LIST(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strtold.c)
-add_library(crt ${CRT_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/crt_precomp.h.gch)
+if(NOT ARCH MATCHES i386)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/except/i386/unwind.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/*.c)
+if(NOT ARCH MATCHES amd64)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/float/i386/*.c)
+endif(NOT ARCH MATCHES amd64)
+else(NOT ARCH MATCHES i386)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/stubs.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/mem/memchr.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/mem/memcpy.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/mem/memmove.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/mem/memset.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strcat.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strchr.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strcmp.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strcpy.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strlen.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strncat.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strncmp.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strncpy.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strnlen.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strrchr.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcscat.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcschr.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcscmp.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcscpy.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcslen.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcsncat.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcsncmp.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcsncpy.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcsnlen.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcsrchr.c)
+endif(NOT ARCH MATCHES i386)
+
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/abs.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/cos.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/j0_y0.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/j1_y1.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/jn_yn.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/labs.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/rand_nt.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/math/sin.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/stdio/findgen.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/stdlib/atold.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/stdlib/malloc.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/mbstowcs_nt.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strtold.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/wcstombs_nt.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/witoa.c)
+list(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/witow.c)
+
+file(GLOB_RECURSE CRT_ASM_SOURCE
"${CMAKE_CURRENT_SOURCE_DIR}/except/${ARCH}/*.s"
+
"${CMAKE_CURRENT_SOURCE_DIR}/math/${ARCH}/*.s"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mem/${ARCH}/*.s"
+
"${CMAKE_CURRENT_SOURCE_DIR}/string/${ARCH}/*.s"
+
"${CMAKE_CURRENT_SOURCE_DIR}/setjmp/${ARCH}/*.s")
+
+add_library(crt ${CRT_SOURCE} ${CRT_ASM_SOURCE}
${CMAKE_CURRENT_BINARY_DIR}/crt_precomp.h.gch)
+
set_property(TARGET crt PROPERTY COMPILE_DEFINITIONS __MINGW_IMPORT=extern
USE_MSVCRT_PREFIX _MSVCRT_LIB_ _MSVCRT_ _MT)
add_pch(crt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${CRT_SOURCE})
add_dependencies(crt psdk)
Modified: branches/cmake-bringup/lib/sdk/crt/locale/locale.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/local…
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/locale/locale.c [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/locale/locale.c [iso-8859-1] Sat Aug 14 10:41:24
2010
@@ -755,38 +755,20 @@
/*********************************************************************
- * __lc_collate_cp (MSVCRT.@)
- *
- * @unimplemented
- */
-void __lc_collate_cp(int cp)
-{
-FIXME("__lc_collate_cp - stub\n");
-return;
-}
-
-
-/*********************************************************************
- * __lc_handle (MSVCRT.@)
- *
- * @unimplemented
- */
-void __lc_handle(void)
-{
-FIXME("__lc_handle - stub\n");
-return;
-}
-
-
-/*********************************************************************
- * __lc_codepage (MSVCRT.@)
- *
- * @unimplemented
- */
-void __lc_codepage(void)
-{
-FIXME("__lc_codepage - stub\n");
-return;
+ * ___lc_handle_func (MSVCRT.@)
+ */
+HANDLE * CDECL ___lc_handle_func(void)
+{
+ return MSVCRT___lc_handle;
+}
+
+
+/*********************************************************************
+ * ___lc_codepage_func (MSVCRT.@)
+ */
+int CDECL ___lc_codepage_func(void)
+{
+ return MSVCRT___lc_codepage;
}