util/u_debug: use detect_os.h
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 1 Aug 2019 21:36:30 +0000 (22:36 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Fri, 2 Aug 2019 17:38:52 +0000 (18:38 +0100)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/util/u_debug.c
src/util/u_debug.h

index b27bf7c5480ff4bd47cd11bb5c9f75ffcd9780a9..cd31ca6e1300b7b2b66c893fed3bd757b80e7f87 100644 (file)
@@ -51,7 +51,7 @@ void
 _debug_vprintf(const char *format, va_list ap)
 {
    static char buf[4096] = {'\0'};
 _debug_vprintf(const char *format, va_list ap)
 {
    static char buf[4096] = {'\0'};
-#if defined(PIPE_OS_WINDOWS) || defined(EMBEDDED_DEVICE)
+#if DETECT_OS_WINDOWS || defined(EMBEDDED_DEVICE)
    /* We buffer until we find a newline. */
    size_t len = strlen(buf);
    int ret = vsnprintf(buf + len, sizeof(buf) - len, format, ap);
    /* We buffer until we find a newline. */
    size_t len = strlen(buf);
    int ret = vsnprintf(buf + len, sizeof(buf) - len, format, ap);
index b3505caebfdf3f01975d4296713e9aef4d92f028..2136920417ab0a890f6cc3faedeb337883a2f7b1 100644 (file)
@@ -40,8 +40,9 @@
 
 
 #include "util/os_misc.h"
 
 
 #include "util/os_misc.h"
+#include "util/detect_os.h"
 
 
-#if defined(PIPE_OS_HAIKU)
+#if DETECT_OS_HAIKU
 /* Haiku provides debug_printf in libroot with OS.h */
 #include <OS.h>
 #endif
 /* Haiku provides debug_printf in libroot with OS.h */
 #include <OS.h>
 #endif
@@ -82,7 +83,7 @@ _debug_printf(const char *format, ...)
  * - avoid outputing large strings (512 bytes is the current maximum length
  * that is guaranteed to be printed in all platforms)
  */
  * - avoid outputing large strings (512 bytes is the current maximum length
  * that is guaranteed to be printed in all platforms)
  */
-#if !defined(PIPE_OS_HAIKU)
+#if !DETECT_OS_HAIKU
 static inline void
 debug_printf(const char *format, ...) _util_printf_format(1,2);
 
 static inline void
 debug_printf(const char *format, ...) _util_printf_format(1,2);