[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37089] trunk/lib/windows/wintab/INCLUDE/ wintab.h: fix compile on Windows

Andrea Weikert elubie at gmx.net
Thu Jun 2 10:34:57 CEST 2011


Revision: 37089
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37089
Author:   elubie
Date:     2011-06-02 08:34:57 +0000 (Thu, 02 Jun 2011)
Log Message:
-----------
fix compile on Windows
* renamed conflicting #define INT to INTEGRAL -> this conflicts with #define in windows.h, and was a really badly chosen name for a macro!
* detected when this file threw off compiling of wglew.h, which uses the INT #define from windows.h

Modified Paths:
--------------
    trunk/lib/windows/wintab/INCLUDE/wintab.h

Modified: trunk/lib/windows/wintab/INCLUDE/wintab.h
===================================================================
--- trunk/lib/windows/wintab/INCLUDE/wintab.h	2011-06-02 08:29:16 UTC (rev 37088)
+++ trunk/lib/windows/wintab/INCLUDE/wintab.h	2011-06-02 08:34:57 UTC (rev 37089)
@@ -84,18 +84,18 @@
 typedef DWORD FIX32;				/* fixed-point arithmetic type */
 
 #ifndef NOFIX32
-	#define INT(x)			HIWORD(x)
+	#define INTEGRAL(x)	HIWORD(x)
 	#define FRAC(x)		LOWORD(x)
 
 	#define CASTFIX32(x)	((FIX32)((x)*65536L))
 
-	#define ROUND(x)		(INT(x) + (FRAC(x) > (WORD)0x8000))
+	#define ROUND(x)		(INTEGRAL(x) + (FRAC(x) > (WORD)0x8000))
 
 	#define FIX_MUL(c, a, b)							\
 		(c = (((DWORD)FRAC(a) * FRAC(b)) >> 16) +	\
-			(DWORD)INT(a) * FRAC(b) +					\
-			(DWORD)INT(b) * FRAC(a) +					\
-			((DWORD)INT(a) * INT(b) << 16))
+			(DWORD)INTEGRAL(a) * FRAC(b) +					\
+			(DWORD)INTEGRAL(b) * FRAC(a) +					\
+			((DWORD)INTEGRAL(a) * INTEGRAL(b) << 16))
 
 	#ifdef _WINDLL
 		#define FIX_DIV_SC static
@@ -111,7 +111,7 @@
 			temp = ((a / b) << 16);					\
 			rem = a % b;								\
 			btemp = b;									\
-			if (INT(btemp) < 256) {					\
+			if (INTEGRAL(btemp) < 256) {					\
 				rem <<= 8;								\
 			}												\
 			else {										\




More information about the Bf-blender-cvs mailing list