aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/imports.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-13 16:54:57 +0100
committermarha <marha@users.sourceforge.net>2012-01-13 16:54:57 +0100
commit5cfbe97cd797d8f78ece208bb5114704b83d8aab (patch)
tree5c88c73ee39367742bb5547ef6fb5a3d25d656e0 /mesalib/src/mesa/main/imports.h
parent39324211d7a79ef8115fd1e39771a2e400b31993 (diff)
downloadvcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.tar.gz
vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.tar.bz2
vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.zip
libxtrans libXdmcp libxcb mesa xserver git update 13 jan 2012
Diffstat (limited to 'mesalib/src/mesa/main/imports.h')
-rw-r--r--mesalib/src/mesa/main/imports.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/mesalib/src/mesa/main/imports.h b/mesalib/src/mesa/main/imports.h
index b7e87439f..ce7b45d77 100644
--- a/mesalib/src/mesa/main/imports.h
+++ b/mesalib/src/mesa/main/imports.h
@@ -566,6 +566,9 @@ _mesa_inv_sqrtf(float x);
extern void
_mesa_init_sqrt_table(void);
+
+#ifndef FFS_DEFINED
+#define FFS_DEFINED 1
#ifdef __GNUC__
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(ANDROID) || defined(__APPLE__)
@@ -573,10 +576,16 @@ _mesa_init_sqrt_table(void);
#define ffsll __builtin_ffsll
#endif
-#define _mesa_ffs(i) ffs(i)
-#define _mesa_ffsll(i) ffsll(i)
+#else
+
+extern int ffs(int i);
+extern int ffsll(long long int i);
+
+#endif /*__ GNUC__ */
+#endif /* FFS_DEFINED */
-#if ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) /* gcc 3.4 or later */
+
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) /* gcc 3.4 or later */
#define _mesa_bitcount(i) __builtin_popcount(i)
#define _mesa_bitcount_64(i) __builtin_popcountll(i)
#else
@@ -586,16 +595,6 @@ extern unsigned int
_mesa_bitcount_64(uint64_t n);
#endif
-#else
-extern int
-_mesa_ffs(int32_t i);
-
-extern int
-_mesa_ffsll(int64_t i);
-
-extern unsigned int
-_mesa_bitcount(unsigned int n);
-#endif
extern GLhalfARB
_mesa_float_to_half(float f);