Author: jgardou
Date: Sat Dec 31 17:29:42 2011
New Revision: 54795
URL:
http://svn.reactos.org/svn/reactos?rev=54795&view=rev
Log:
[NEWINFLIB]
- better fix for non standard use of swprintf, by Thomas Faber
Modified:
trunk/reactos/lib/newinflib/CMakeLists.txt
trunk/reactos/lib/newinflib/infget.c
Modified: trunk/reactos/lib/newinflib/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/newinflib/CMakeLists.t…
==============================================================================
--- trunk/reactos/lib/newinflib/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/newinflib/CMakeLists.txt [iso-8859-1] Sat Dec 31 17:29:42 2011
@@ -20,10 +20,10 @@
infhostput.c
infhostrtl.c)
- add_definitions(-D__NO_CTYPE_INLINES -DINFLIB_HOST)
+ add_definitions(-D__NO_CTYPE_INLINES -DINFLIB_HOST -D_CRT_NON_CONFORMING_SWPRINTFS)
+ add_library(inflibhost ${GLOBAL_FILES} ${SOURCE})
if(NOT MSVC)
- add_compile_flags("-Wpointer-arith -Wwrite-strings")
+ add_target_compile_flags(inflibhost "-Wpointer-arith -Wwrite-strings")
endif()
- add_library(inflibhost ${GLOBAL_FILES} ${SOURCE})
target_link_libraries(inflibhost unicode)
endif()
Modified: trunk/reactos/lib/newinflib/infget.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/newinflib/infget.c?rev…
==============================================================================
--- trunk/reactos/lib/newinflib/infget.c [iso-8859-1] (original)
+++ trunk/reactos/lib/newinflib/infget.c [iso-8859-1] Sat Dec 31 17:29:42 2011
@@ -48,10 +48,9 @@
if (Inf->LanguageId != 0)
{
- _snwprintf(StringLangId,
- 13,
- L"Strings.%04hx",
- Inf->LanguageId);
+ swprintf(StringLangId,
+ L"Strings.%04hx",
+ Inf->LanguageId);
Status = InfpFindFirstLine(Inf,
StringLangId,
@@ -59,10 +58,9 @@
&Context);
if (Status != INF_STATUS_SUCCESS)
{
- _snwprintf(StringLangId,
- 13,
- L"Strings.%04hx",
- MAKELANGID(PRIMARYLANGID(Inf->LanguageId), SUBLANG_NEUTRAL));
+ swprintf(StringLangId,
+ L"Strings.%04hx",
+ MAKELANGID(PRIMARYLANGID(Inf->LanguageId), SUBLANG_NEUTRAL));
Status = InfpFindFirstLine(Inf,
StringLangId,