summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-04-14 23:55:36 +0900
committerJosé Fonseca <[email protected]>2008-04-15 10:13:52 +0900
commit5b8fa518476868530d748ce6d03674e9cca3d89f (patch)
tree0203b70b4a0da695fc013e94a7554789cd95967c /src/gallium/include/pipe
parent21ae3d2721326d56c76370fd8bfcc1536203925d (diff)
gallium: Don't assume snprintf are always available.
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_format.h4
-rw-r--r--src/gallium/include/pipe/p_util.h8
2 files changed, 2 insertions, 10 deletions
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 9e0f91f202b..ef9e3a3d6c0 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -28,7 +28,7 @@
#ifndef PIPE_FORMAT_H
#define PIPE_FORMAT_H
-#include <stdio.h> /* for sprintf */
+#include "util/u_string.h"
#include "p_compiler.h"
#include "p_debug.h"
@@ -367,7 +367,7 @@ static INLINE char *pf_sprint_name( char *str, enum pipe_format format )
strcat( str, "S" );
break;
}
- sprintf( &str[strlen( str )], "%u", size * scale );
+ util_snprintf( &str[strlen( str )], 32, "%u", size * scale );
}
if (i != 0) {
strcat( str, "_" );
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h
index 8e3aaee496f..dbca080a4b9 100644
--- a/src/gallium/include/pipe/p_util.h
+++ b/src/gallium/include/pipe/p_util.h
@@ -138,14 +138,6 @@ REALLOC( void *old_ptr, unsigned old_size, unsigned new_size )
#define GETENV( X ) debug_get_option( X, NULL )
-#ifdef WIN32
-int rpl_vsnprintf(char *, size_t, const char *, va_list);
-int rpl_snprintf(char *str, size_t size, const char *format, ...);
-#define vsnprintf rpl_vsnprintf
-#define snprintf rpl_snprintf
-#endif
-
-
/**
* Return memory on given byte alignment
*/