From acc1e59013f07e15275943dd95ad96fa2698a95a Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 14 Nov 2012 22:25:05 -0800 Subject: util: Only use open coded snprintf for MSVC. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MinGW has snprintf. The patch fixes these warnings with the MinGW SCons build. src/gallium/auxiliary/util/u_snprintf.c:459:1: warning: no previous prototype for ‘util_vsnprintf’ [-Wmissing-prototypes] src/gallium/auxiliary/util/u_snprintf.c:1436:1: warning: no previous prototype for ‘util_snprintf’ [-Wmissing-prototypes] Signed-off-by: Vinson Lee Tested-by: Brian Paul --- src/gallium/auxiliary/util/u_snprintf.c | 2 +- src/gallium/auxiliary/util/u_string.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/util/u_snprintf.c b/src/gallium/auxiliary/util/u_snprintf.c index e16f103e3f5..a24b6ff38db 100644 --- a/src/gallium/auxiliary/util/u_snprintf.c +++ b/src/gallium/auxiliary/util/u_snprintf.c @@ -167,7 +167,7 @@ #if HAVE_CONFIG_H #include #else -#ifdef _WIN32 +#ifdef _MSC_VER #define vsnprintf util_vsnprintf #define snprintf util_snprintf #define HAVE_VSNPRINTF 0 diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h index 15630ad0791..fca73ffc718 100644 --- a/src/gallium/auxiliary/util/u_string.h +++ b/src/gallium/auxiliary/util/u_string.h @@ -35,7 +35,7 @@ #ifndef U_STRING_H_ #define U_STRING_H_ -#if !defined(_WIN32) && !defined(XF86_LIBC_H) +#if !defined(_MSC_VER) && !defined(XF86_LIBC_H) #include #endif #include @@ -64,7 +64,7 @@ util_strchrnul(const char *s, char c) #endif -#ifdef _WIN32 +#ifdef _MSC_VER int util_vsnprintf(char *, size_t, const char *, va_list); int util_snprintf(char *str, size_t size, const char *format, ...); -- cgit v1.2.3