summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/imports.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/imports.c')
-rw-r--r--src/mesa/main/imports.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 0c2c894eef0..cb04594c1fd 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -557,7 +557,7 @@ _mesa_pow(double x, double y)
* Find the first bit set in a word.
*/
int
-_mesa_ffs(int i)
+_mesa_ffs(int32_t i)
{
#if (defined(_WIN32) ) || defined(__IBMC__) || defined(__IBMCPP__)
register int bit = 0;
@@ -594,11 +594,7 @@ _mesa_ffs(int i)
* if no bits set.
*/
int
-#ifdef __MINGW32__
-_mesa_ffsll(long val)
-#else
-_mesa_ffsll(long long val)
-#endif
+_mesa_ffsll(int64_t val)
{
#ifdef ffsll
return ffsll(val);
@@ -607,11 +603,11 @@ _mesa_ffsll(long long val)
assert(sizeof(val) == 8);
- bit = _mesa_ffs(val);
+ bit = _mesa_ffs((int32_t)val);
if (bit != 0)
return bit;
- bit = _mesa_ffs(val >> 32);
+ bit = _mesa_ffs((int32_t)(val >> 32));
if (bit != 0)
return 32 + bit;
@@ -950,12 +946,10 @@ _mesa_snprintf( char *str, size_t size, const char *fmt, ... )
void
_mesa_printf( const char *fmtString, ... )
{
- char s[MAXSTRING];
va_list args;
va_start( args, fmtString );
- vsnprintf(s, MAXSTRING, fmtString, args);
+ vfprintf(stderr, fmtString, args);
va_end( args );
- fprintf(stderr, "%s", s);
}
/** Wrapper around fprintf(), using vsprintf() for the formatting. */