[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57126] trunk/blender/source/blender/ blenlib/BLI_sys_types.h: Addition to r57094 by Campbell:
Juergen Herrmann
shadowrom at me.com
Wed May 29 20:23:59 CEST 2013
Revision: 57126
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57126
Author: shadowrom
Date: 2013-05-29 18:23:59 +0000 (Wed, 29 May 2013)
Log Message:
-----------
Addition to r57094 by Campbell:
VS 2010 and 2012 have stdint.h so we should use them for consistency instead of defining the inttypes ourselves.
Added if condition for for stdint.h include for >= VS 2010
P.S.: Compiled and tested on VS2008-2012 and MinGW with scons and CMake ;)
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57094
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/BLI_sys_types.h
Modified: trunk/blender/source/blender/blenlib/BLI_sys_types.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_sys_types.h 2013-05-29 18:18:11 UTC (rev 57125)
+++ trunk/blender/source/blender/blenlib/BLI_sys_types.h 2013-05-29 18:23:59 UTC (rev 57126)
@@ -46,9 +46,10 @@
#ifdef __cplusplus
extern "C" {
#endif
-
-#if defined(_WIN32) && !defined(FREE_WINDOWS)
+/* MSVC 2010 and 2012 (>=1600) have stdint.h so we should use this for consistency */
+#if defined(_WIN32) && !defined(FREE_WINDOWS) && _MSC_VER <= 1500
+
/* The __intXX are built-in types of the visual compiler! So we don't
* need to include anything else here. */
@@ -99,7 +100,8 @@
#include <inttypes.h>
-#elif defined(FREE_WINDOWS)
+/* MinGW and MSVC >= 2010 */
+#elif defined(FREE_WINDOWS) || _MSC_VER >= 1600
#include <stdint.h>
#else
More information about the Bf-blender-cvs
mailing list