summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-08-01 16:55:39 +0100
committerEric Engestrom <[email protected]>2019-08-02 18:38:52 +0100
commit87adc898b32778f86a488e22c3f7d0744eae245e (patch)
treeddc0aff8f557c04f77872d8417ad756a0cdbd8d9
parent9a5148190a30c6d710035a64573b745d2e3c54b5 (diff)
util/os_memory: use detect_os.h to uncouple it from gallium
While at it, remove p_compiler.h as well as it is unused. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/util/os_memory.h7
-rw-r--r--src/util/os_memory_aligned.h3
-rw-r--r--src/util/os_memory_debug.h3
-rw-r--r--src/util/os_memory_stdc.h4
4 files changed, 3 insertions, 14 deletions
diff --git a/src/util/os_memory.h b/src/util/os_memory.h
index 7a40ba9e608..7a67e440dee 100644
--- a/src/util/os_memory.h
+++ b/src/util/os_memory.h
@@ -34,10 +34,7 @@
#ifndef _OS_MEMORY_H_
#define _OS_MEMORY_H_
-
-#include "pipe/p_config.h"
-#include "pipe/p_compiler.h"
-
+#include "detect_os.h"
#if defined(EMBEDDED_DEVICE)
@@ -67,7 +64,7 @@ os_free_aligned(void *ptr);
}
#endif
-#elif defined(PIPE_OS_WINDOWS) && defined(DEBUG) && !defined(DEBUG_MEMORY_IMPLEMENTATION)
+#elif DETECT_OS_WINDOWS && defined(DEBUG) && !defined(DEBUG_MEMORY_IMPLEMENTATION)
# include "os_memory_debug.h"
diff --git a/src/util/os_memory_aligned.h b/src/util/os_memory_aligned.h
index df398a32bfd..33eacb99c7f 100644
--- a/src/util/os_memory_aligned.h
+++ b/src/util/os_memory_aligned.h
@@ -36,9 +36,6 @@
#endif
-#include "pipe/p_compiler.h"
-
-
/**
* Add two size_t values with integer overflow check.
diff --git a/src/util/os_memory_debug.h b/src/util/os_memory_debug.h
index 9a487dec05c..8f3e936cbbf 100644
--- a/src/util/os_memory_debug.h
+++ b/src/util/os_memory_debug.h
@@ -36,9 +36,6 @@
#endif
-#include "pipe/p_compiler.h"
-
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/src/util/os_memory_stdc.h b/src/util/os_memory_stdc.h
index c9fde06d8ac..a4a670d589a 100644
--- a/src/util/os_memory_stdc.h
+++ b/src/util/os_memory_stdc.h
@@ -37,8 +37,6 @@
#include <stdlib.h>
-#include "pipe/p_compiler.h"
-
#define os_malloc(_size) malloc(_size)
#define os_calloc(_count, _size ) calloc(_count, _size )
@@ -62,7 +60,7 @@ os_malloc_aligned(size_t size, size_t alignment)
#define os_free_aligned(_ptr) free(_ptr)
-#elif defined(PIPE_OS_WINDOWS)
+#elif DETECT_OS_WINDOWS
#include <malloc.h>