[NEWINFLIB]

- better fix for non standard use of swprintf, by Thomas Faber

svn path=/trunk/; revision=54795
This commit is contained in:
Jérôme Gardou 2011-12-31 17:29:42 +00:00
parent 50bbe47f26
commit bc18a6c289
2 changed files with 10 additions and 12 deletions

View file

@ -20,10 +20,10 @@ else()
infhostput.c
infhostrtl.c)
add_definitions(-D__NO_CTYPE_INLINES -DINFLIB_HOST)
if(NOT MSVC)
add_compile_flags("-Wpointer-arith -Wwrite-strings")
endif()
add_definitions(-D__NO_CTYPE_INLINES -DINFLIB_HOST -D_CRT_NON_CONFORMING_SWPRINTFS)
add_library(inflibhost ${GLOBAL_FILES} ${SOURCE})
if(NOT MSVC)
add_target_compile_flags(inflibhost "-Wpointer-arith -Wwrite-strings")
endif()
target_link_libraries(inflibhost unicode)
endif()

View file

@ -48,10 +48,9 @@ InfpGetSubstitutionString(PINFCACHE Inf,
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 @@ InfpGetSubstitutionString(PINFCACHE Inf,
&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,