summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/p_debug.c4
-rw-r--r--src/gallium/auxiliary/util/u_string.h12
2 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/p_debug.c b/src/gallium/auxiliary/util/p_debug.c
index 082b0e9fb5..2c2f2f8931 100644
--- a/src/gallium/auxiliary/util/p_debug.c
+++ b/src/gallium/auxiliary/util/p_debug.c
@@ -324,7 +324,11 @@ void _debug_assert_fail(const char *expr,
const char *function)
{
_debug_printf("%s:%u:%s: Assertion `%s' failed.\n", file, line, function, expr);
+#if defined(PIPE_OS_WINDOWS)
+ if (debug_get_bool_option("GALLIUM_ABORT_ON_ASSERT", FALSE))
+#else
if (debug_get_bool_option("GALLIUM_ABORT_ON_ASSERT", TRUE))
+#endif
debug_break();
else
_debug_printf("continuing...\n");
diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h
index abc3232b49..08c89bbf77 100644
--- a/src/gallium/auxiliary/util/u_string.h
+++ b/src/gallium/auxiliary/util/u_string.h
@@ -28,14 +28,14 @@
/**
* @file
* Platform independent functions for string manipulation.
- *
+ *
* @author Jose Fonseca <jrfonseca@tungstengraphics.com>
*/
#ifndef U_STRING_H_
#define U_STRING_H_
-#ifndef WIN32
+#if !defined(WIN32) && !defined(XF86_LIBC_H)
#include <stdio.h>
#endif
#include <stddef.h>
@@ -48,19 +48,19 @@
extern "C" {
#endif
-
+
#ifdef WIN32
-
+
int util_vsnprintf(char *, size_t, const char *, va_list);
int util_snprintf(char *str, size_t size, const char *format, ...);
-static INLINE void
+static INLINE void
util_vsprintf(char *str, const char *format, va_list ap)
{
util_vsnprintf(str, (size_t)-1, format, ap);
}
-static INLINE void
+static INLINE void
util_sprintf(char *str, const char *format, ...)
{
va_list ap;