From 4b6c66431ef80d7544ffd709d4c3435f52552bb1 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 3 Jul 2008 12:07:12 +0000 Subject: [PATCH] - Fix double linking of snprintf (_snprintf should be used in CRT). - Add a #undef guard for snprintf in consistency with how it previously was implemented in CRT. svn path=/trunk/; revision=34282 --- reactos/lib/sdk/crt/locale/locale.c | 2 +- reactos/lib/sdk/crt/string/wcs.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/lib/sdk/crt/locale/locale.c b/reactos/lib/sdk/crt/locale/locale.c index 6d092f0eeb6..03f48cc9125 100644 --- a/reactos/lib/sdk/crt/locale/locale.c +++ b/reactos/lib/sdk/crt/locale/locale.c @@ -489,7 +489,7 @@ char *setlocale(int category, const char *locale) MSVCRT_current_lc_all_lcid = lcid; - snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s", + _snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s", lc.found_language,lc.found_country,lc.found_codepage); switch (category) { diff --git a/reactos/lib/sdk/crt/string/wcs.c b/reactos/lib/sdk/crt/string/wcs.c index d0708df588f..cfa253b7a85 100644 --- a/reactos/lib/sdk/crt/string/wcs.c +++ b/reactos/lib/sdk/crt/string/wcs.c @@ -48,6 +48,7 @@ #undef sprintf #undef wsprintf +#undef snprintf #undef vsnprintf #undef vprintf #undef vwprintf