summaryrefslogtreecommitdiff
path: root/src/gallium/include
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-07-26 09:17:10 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-07-26 09:18:07 +0900
commitff7a7031caa0ac592f210aca696a20c9de6dc0d4 (patch)
tree39f9cbd6193555005a720c7e934ba56f03444a88 /src/gallium/include
parent40acf8cce24afe80388639b804f9ae8c0b779d81 (diff)
gallium: Windows miniport portability fixes.
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_util.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h
index 7dcdd28287..892bd4bf8a 100644
--- a/src/gallium/include/pipe/p_util.h
+++ b/src/gallium/include/pipe/p_util.h
@@ -33,8 +33,71 @@
#include "p_debug.h"
#include "p_format.h"
#include "p_pointer.h"
+
+#if defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT) || defined(PIPE_SUBSYSTEM_WINDOWS_CE)
+__inline double ceil(double val)
+{
+ double ceil_val;
+
+ if((val - (long) val) == 0) {
+ ceil_val = val;
+ } else {
+ if(val > 0) {
+ ceil_val = (long) val + 1;
+ } else {
+ ceil_val = (long) val;
+ }
+ }
+
+ return ceil_val;
+}
+
+#ifndef PIPE_SUBSYSTEM_WINDOWS_CE
+__inline double floor(double val)
+{
+ double floor_val;
+
+ if((val - (long) val) == 0) {
+ floor_val = val;
+ } else {
+ if(val > 0) {
+ floor_val = (long) val;
+ } else {
+ floor_val = (long) val - 1;
+ }
+ }
+
+ return floor_val;
+}
+#endif
+
+#pragma function(pow)
+__inline double __cdecl pow(double val, double exponent)
+{
+ /* XXX */
+ assert(0);
+ return 0;
+}
+
+#pragma function(log)
+__inline double __cdecl log(double val)
+{
+ /* XXX */
+ assert(0);
+ return 0;
+}
+
+#pragma function(atan2)
+__inline double __cdecl atan2(double val)
+{
+ /* XXX */
+ assert(0);
+ return 0;
+}
+#else
#include <math.h>
#include <stdarg.h>
+#endif
#ifdef __cplusplus