[Scummvm-cvs-logs] scummvm master -> 950faa4143a8473f77ddc78c02fda7d38f1f557d

lordhoto lordhoto at gmail.com
Sun Jul 24 20:21:22 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
950faa4143 COMMON: Limited gcc specific intLog2 to gcc 3.4 or newer.


Commit: 950faa4143a8473f77ddc78c02fda7d38f1f557d
    https://github.com/scummvm/scummvm/commit/950faa4143a8473f77ddc78c02fda7d38f1f557d
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-07-24T11:18:21-07:00

Commit Message:
COMMON: Limited gcc specific intLog2 to gcc 3.4 or newer.

Older gcc versions did not include __builtin_clz, which made the PS2 port
fail to compile, since it uses 3.2.2.

Changed paths:
    common/math.h



diff --git a/common/math.h b/common/math.h
index 9542cb6..56ab171 100644
--- a/common/math.h
+++ b/common/math.h
@@ -50,7 +50,7 @@ struct Complex {
 	float re, im;
 };
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
 inline int intLog2(uint32 v) {
 	// This is a slightly optimized implementation of log2 for natural numbers
 	// targeting gcc. It also saves some binary size over our fallback






More information about the Scummvm-git-logs mailing list