summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-09-24 13:20:33 -0600
committerBrian Paul <[email protected]>2012-09-24 14:48:06 -0600
commit14ca76646ad2140aba44ae7070b04019ce2b3da0 (patch)
treeea277315a5bdd71896456b1caf2d6f70782f74d1 /src/mesa/main
parentdefe8f0da263c95935dd14d106141d0a22d24aba (diff)
mesa: add signbit() macro
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/imports.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 81da5104717..a78d67966f8 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -145,6 +145,13 @@ static inline int isblank(int ch) { return ch == ' ' || ch == '\t'; }
/*@}*/
+/*
+ * signbit() is a macro on Linux. Not available on Windows.
+ */
+#ifndef signbit
+#define signbit(x) ((x) < 0.0f)
+#endif
+
/** single-precision inverse square root */
static inline float