Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / util / os_memory_stdc.h
index c9fde06d8ac2dea35aa68514d4e4d65a5c34cbac..bda5715998fbe347aa647166e91acfbd040b8639 100644 (file)
@@ -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 )
 #define os_realloc( _old_ptr, _old_size, _new_size) \
    realloc(_old_ptr, _new_size + 0*(_old_size))
 
-
-#if defined(HAVE_POSIX_MEMALIGN)
-
-static inline void *
-os_malloc_aligned(size_t size, size_t alignment)
-{
-   void *ptr;
-   alignment = (alignment + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
-   if(posix_memalign(&ptr, alignment, size) != 0)
-      return NULL;
-   return ptr;
-}
-
-#define os_free_aligned(_ptr) free(_ptr)
-
-#elif defined(PIPE_OS_WINDOWS)
+#if DETECT_OS_WINDOWS
 
 #include <malloc.h>
 
 #define os_malloc_aligned(_size, _align) _aligned_malloc(_size, _align)
 #define os_free_aligned(_ptr) _aligned_free(_ptr)
+#define os_realloc_aligned(_ptr, _oldsize, _newsize, _alignment) _aligned_realloc(_ptr, _newsize, _alignment)
 
 #else