mirror of
https://github.com/reactos/reactos.git
synced 2024-08-07 19:58:21 +00:00
modified dll/3rdparty/mesa32/src/main/imports.c
We don't have _aligned_malloc in our CRT, whatever compiler we use modified dll/3rdparty/mesa32/src/main/imports.h The mysterious MESA compilation bug has been found: seems the Visual C++ preprocessor doesn't know about the "F" number suffix modified dll/3rdparty/mesa32/reactos.diff Updated the diff svn path=/trunk/; revision=42529
This commit is contained in:
parent
e307cb2881
commit
e50fa1e50e
52
reactos/dll/3rdparty/mesa32/reactos.diff
vendored
52
reactos/dll/3rdparty/mesa32/reactos.diff
vendored
|
@ -3995,3 +3995,55 @@ Index: x86/common_x86.c
|
|||
|
||||
if ( cpu_has_xmm ) {
|
||||
_mesa_debug(NULL, "Yes.\n");
|
||||
Index: main/imports.c
|
||||
===================================================================
|
||||
--- main/imports.c (revision 42472)
|
||||
+++ main/imports.c (working copy)
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
(void) posix_memalign(& mem, alignment, bytes);
|
||||
return mem;
|
||||
-#elif defined(_WIN32) && defined(_MSC_VER)
|
||||
+#elif 0/*defined(_WIN32) && defined(_MSC_VER)*/
|
||||
return _aligned_malloc(bytes, alignment);
|
||||
#else
|
||||
uintptr_t ptr, buf;
|
||||
@@ -146,7 +146,7 @@
|
||||
}
|
||||
|
||||
return mem;
|
||||
-#elif defined(_WIN32) && defined(_MSC_VER)
|
||||
+#elif 0/*defined(_WIN32) && defined(_MSC_VER)*/
|
||||
void *mem;
|
||||
|
||||
mem = _aligned_malloc(bytes, alignment);
|
||||
Index: main/imports.h
|
||||
===================================================================
|
||||
--- main/imports.h (revision 42472)
|
||||
+++ main/imports.h (working copy)
|
||||
@@ -482,10 +482,10 @@
|
||||
/* This function/macro is sensitive to precision. Test very carefully
|
||||
* if you change it!
|
||||
*/
|
||||
-#define UNCLAMPED_FLOAT_TO_UBYTE(UB, F) \
|
||||
+#define UNCLAMPED_FLOAT_TO_UBYTE(UB, F_) \
|
||||
do { \
|
||||
fi_type __tmp; \
|
||||
- __tmp.f = (F); \
|
||||
+ __tmp.f = (F_); \
|
||||
if (__tmp.i < 0) \
|
||||
UB = (GLubyte) 0; \
|
||||
else if (__tmp.i >= IEEE_0996) \
|
||||
@@ -495,10 +495,10 @@
|
||||
UB = (GLubyte) __tmp.i; \
|
||||
} \
|
||||
} while (0)
|
||||
-#define CLAMPED_FLOAT_TO_UBYTE(UB, F) \
|
||||
+#define CLAMPED_FLOAT_TO_UBYTE(UB, F_) \
|
||||
do { \
|
||||
fi_type __tmp; \
|
||||
- __tmp.f = (F) * (255.0F/256.0F) + 32768.0F; \
|
||||
+ __tmp.f = (F_) * (255.0F/256.0F) + 32768.0F; \
|
||||
UB = (GLubyte) __tmp.i; \
|
||||
} while (0)
|
||||
#else
|
||||
|
|
|
@ -104,7 +104,7 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment)
|
|||
|
||||
(void) posix_memalign(& mem, alignment, bytes);
|
||||
return mem;
|
||||
#elif defined(_WIN32) && defined(_MSC_VER)
|
||||
#elif 0/*defined(_WIN32) && defined(_MSC_VER)*/
|
||||
return _aligned_malloc(bytes, alignment);
|
||||
#else
|
||||
uintptr_t ptr, buf;
|
||||
|
@ -146,7 +146,7 @@ _mesa_align_calloc(size_t bytes, unsigned long alignment)
|
|||
}
|
||||
|
||||
return mem;
|
||||
#elif defined(_WIN32) && defined(_MSC_VER)
|
||||
#elif 0/*defined(_WIN32) && defined(_MSC_VER)*/
|
||||
void *mem;
|
||||
|
||||
mem = _aligned_malloc(bytes, alignment);
|
||||
|
|
|
@ -482,10 +482,10 @@ _mesa_is_pow_two(int x)
|
|||
/* This function/macro is sensitive to precision. Test very carefully
|
||||
* if you change it!
|
||||
*/
|
||||
#define UNCLAMPED_FLOAT_TO_UBYTE(UB, F) \
|
||||
#define UNCLAMPED_FLOAT_TO_UBYTE(UB, F_) \
|
||||
do { \
|
||||
fi_type __tmp; \
|
||||
__tmp.f = (F); \
|
||||
__tmp.f = (F_); \
|
||||
if (__tmp.i < 0) \
|
||||
UB = (GLubyte) 0; \
|
||||
else if (__tmp.i >= IEEE_0996) \
|
||||
|
@ -495,10 +495,10 @@ _mesa_is_pow_two(int x)
|
|||
UB = (GLubyte) __tmp.i; \
|
||||
} \
|
||||
} while (0)
|
||||
#define CLAMPED_FLOAT_TO_UBYTE(UB, F) \
|
||||
#define CLAMPED_FLOAT_TO_UBYTE(UB, F_) \
|
||||
do { \
|
||||
fi_type __tmp; \
|
||||
__tmp.f = (F) * (255.0F/256.0F) + 32768.0F; \
|
||||
__tmp.f = (F_) * (255.0F/256.0F) + 32768.0F; \
|
||||
UB = (GLubyte) __tmp.i; \
|
||||
} while (0)
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue