diff options
author | José Fonseca <[email protected]> | 2008-04-14 23:55:36 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-04-15 10:13:52 +0900 |
commit | 5b8fa518476868530d748ce6d03674e9cca3d89f (patch) | |
tree | 0203b70b4a0da695fc013e94a7554789cd95967c /src/gallium/auxiliary/util/p_debug.c | |
parent | 21ae3d2721326d56c76370fd8bfcc1536203925d (diff) |
gallium: Don't assume snprintf are always available.
Diffstat (limited to 'src/gallium/auxiliary/util/p_debug.c')
-rw-r--r-- | src/gallium/auxiliary/util/p_debug.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/p_debug.c b/src/gallium/auxiliary/util/p_debug.c index 090e3b7794d..f9366467cd5 100644 --- a/src/gallium/auxiliary/util/p_debug.c +++ b/src/gallium/auxiliary/util/p_debug.c @@ -39,6 +39,7 @@ #include "pipe/p_compiler.h" #include "pipe/p_util.h" #include "pipe/p_debug.h" +#include "util/u_string.h" #ifdef WIN32 @@ -60,7 +61,7 @@ void _debug_vprintf(const char *format, va_list ap) /* EngDebugPrint does not handle float point arguments, so we need to use * our own vsnprintf implementation */ char buf[512 + 1]; - vsnprintf(buf, sizeof(buf), format, ap); + util_vsnprintf(buf, sizeof(buf), format, ap); _EngDebugPrint("%s", buf); #else /* TODO: Implement debug print for WINCE */ @@ -311,7 +312,7 @@ debug_dump_enum(const struct debug_named_value *names, ++names; } - snprintf(rest, sizeof(rest), "0x%08lx", value); + util_snprintf(rest, sizeof(rest), "0x%08lx", value); return rest; } @@ -344,7 +345,7 @@ debug_dump_flags(const struct debug_named_value *names, else first = 0; - snprintf(rest, sizeof(rest), "0x%08lx", value); + util_snprintf(rest, sizeof(rest), "0x%08lx", value); strncat(output, rest, sizeof(output)); } |