Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürgen Herrmann <shadowrom@me.com>2013-05-29 22:23:59 +0400
committerJürgen Herrmann <shadowrom@me.com>2013-05-29 22:23:59 +0400
commit88fd394dba6078b93310658f2f51c2a05594966b (patch)
tree3845d8555daa968965ea3f1011cfabbb2b42144c /source/blender/blenlib/BLI_sys_types.h
parent0d496b8dcea0190226d7ac8804be2c70f081f7b5 (diff)
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 ;)
Diffstat (limited to 'source/blender/blenlib/BLI_sys_types.h')
-rw-r--r--source/blender/blenlib/BLI_sys_types.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_sys_types.h b/source/blender/blenlib/BLI_sys_types.h
index 7a7da5c097b..96eb68e288e 100644
--- a/source/blender/blenlib/BLI_sys_types.h
+++ b/source/blender/blenlib/BLI_sys_types.h
@@ -46,8 +46,9 @@
#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 @@ typedef uint64_t u_int64_t;
#include <inttypes.h>
-#elif defined(FREE_WINDOWS)
+/* MinGW and MSVC >= 2010 */
+#elif defined(FREE_WINDOWS) || _MSC_VER >= 1600
#include <stdint.h>
#else