aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/imports.c
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.c
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.c')
-rw-r--r--mesalib/src/mesa/main/imports.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/imports.c b/mesalib/src/mesa/main/imports.c
index 2469e4265..bbc6ac6e2 100644
--- a/mesalib/src/mesa/main/imports.c
+++ b/mesalib/src/mesa/main/imports.c
@@ -458,9 +458,8 @@ _mesa_inv_sqrtf(float n)
* Find the first bit set in a word.
*/
int
-_mesa_ffs(int32_t i)
+ffs(int i)
{
-#if (defined(_WIN32) ) || defined(__IBMC__) || defined(__IBMCPP__)
register int bit = 0;
if (i != 0) {
if ((i & 0xffff) == 0) {
@@ -482,9 +481,6 @@ _mesa_ffs(int32_t i)
bit++;
}
return bit;
-#else
- return ffs(i);
-#endif
}
@@ -495,23 +491,24 @@ _mesa_ffs(int32_t i)
* if no bits set.
*/
int
-_mesa_ffsll(int64_t val)
+ffsll(long long int val)
{
int bit;
assert(sizeof(val) == 8);
- bit = _mesa_ffs((int32_t)val);
+ bit = ffs((int) val);
if (bit != 0)
return bit;
- bit = _mesa_ffs((int32_t)(val >> 32));
+ bit = ffs((int) (val >> 32));
if (bit != 0)
return 32 + bit;
return 0;
}
-#endif
+#endif /* __GNUC__ */
+
#if !defined(__GNUC__) ||\
((__GNUC__ * 100 + __GNUC_MINOR__) < 304) /* Not gcc 3.4 or later */