Commit e13c1f46dc1afb1b2287849be5fa74ef70e0607b

Alexei Podtelezhnikov 2019-05-31T22:31:47

Solidify VC2005 builds. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly declare `_BitScanReverse' intrinsic. * builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics.

diff --git a/ChangeLog b/ChangeLog
index 55efb87..ebd2438 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-05-31  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	Solidify VC2005 builds.
+
+	* include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly
+	declare `_BitScanReverse' intrinsic.
+	* builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics.
+
 2019-05-30  Nikhil Ramakrishnan  <ramakrishnan.nikhil@gmail.com>
 
 	[sfnt] Separate WOFF sources and headers.
diff --git a/builds/windows/visualc/freetype.vcproj b/builds/windows/visualc/freetype.vcproj
index 385c93e..703fa33 100644
--- a/builds/windows/visualc/freetype.vcproj
+++ b/builds/windows/visualc/freetype.vcproj
@@ -185,7 +185,6 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				EnableIntrinsicFunctions="true"
 				AdditionalIncludeDirectories="..\..\..\include"
 				PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DLL_EXPORT"
 				BasicRuntimeChecks="3"
@@ -259,7 +258,6 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				EnableIntrinsicFunctions="true"
 				AdditionalIncludeDirectories="..\..\..\include"
 				PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY"
 				GeneratePreprocessedFile="0"
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 2986ec3..1811fcd 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -378,6 +378,7 @@ FT_BEGIN_HEADER
 #if FT_SIZEOF_INT == 4
 
 #include <intrin.h>
+#pragma intrinsic( _BitScanReverse )
 
   static __inline FT_Int32
   FT_MSB_i386( FT_UInt32  x )
@@ -385,7 +386,6 @@ FT_BEGIN_HEADER
     unsigned long  where;
 
 
-    /* not available in older VC versions */
     _BitScanReverse( &where, x );
 
     return (FT_Int32)where;