Bug 1080297 - Use native inttypes.h on VS2013. r=glandium
authorDavid Major <dmajor@mozilla.com>
Thu, 09 Oct 2014 21:06:30 +1300
changeset 209535 d6d74761dbb270c3d99297044ebf276a683d29ff
parent 209534 5ec8e8f037bb93a347b43b9ac910df91c24fbb07
child 209536 0daef5a46f407bcca697a2a8b8800fcde36934e7
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersglandium
bugs1080297
milestone35.0a1
Bug 1080297 - Use native inttypes.h on VS2013. r=glandium
mfbt/MSIntTypes.h
--- a/mfbt/MSIntTypes.h
+++ b/mfbt/MSIntTypes.h
@@ -28,16 +28,20 @@
 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef _MSC_VER // [
 #error "Use this header only with Microsoft Visual C++ compilers!"
 #endif // _MSC_VER ]
 
+#if _MSC_VER >= 1800 // [ VS2013 (VC12) provides inttypes.h
+#include <inttypes.h>
+#else // _MSC_VER >= 1800 ][
+
 #ifndef _MSC_INTTYPES_H_ // [
 #define _MSC_INTTYPES_H_
 
 #if _MSC_VER > 1000
 #pragma once
 #endif
 
 #include <stdint.h>
@@ -191,8 +195,9 @@ imaxdiv_t __cdecl imaxdiv(intmax_t numer
 #define strtoumax _strtoui64
 
 // 7.8.2.4 The wcstoimax and wcstoumax functions
 #define wcstoimax _wcstoi64
 #define wcstoumax _wcstoui64
 
 
 #endif // _MSC_INTTYPES_H_ ]
+#endif // _MSC_VER >= 1800 ]