Mesa (master): util: Don't limit debug_printf message length on unices.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Thu Jan 13 11:45:00 UTC 2011
Module: Mesa
Branch: master
Commit: fe2cfd9b19657274244b187310b706ff5aa09728
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe2cfd9b19657274244b187310b706ff5aa09728
Author: José Fonseca <jfonseca at vmware.com>
Date: Thu Jan 13 11:44:16 2011 +0000
util: Don't limit debug_printf message length on unices.
---
src/gallium/auxiliary/util/u_debug.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 2ad2f95..a19db3a 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -47,14 +47,19 @@
void _debug_vprintf(const char *format, va_list ap)
{
+#if defined(PIPE_OS_WINDOWS) || defined(PIPE_OS_EMBEDDED)
/* We buffer until we find a newline. */
static char buf[4096] = {'\0'};
size_t len = strlen(buf);
int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap);
if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) {
- os_log_message(buf);
+ os_log_message(buf * h);
buf[0] = '\0';
}
+#else
+ /* Just print as-is to stderr */
+ vfprintf(stderr, format, ap);
+#endif
}
More information about the mesa-commit
mailing list