diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2017-07-01 07:49:59 (GMT) |
---|---|---|
committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2017-09-16 07:54:11 (GMT) |
commit | f117cc16f6ecf991d16737472f75f9328aa423f0 (patch) | |
tree | 1aedffad51f4ec54a1c6fe7cdedc3abd6e718e97 /src/win32port.h | |
parent | d2bf82fef0535bc351a69392c0e0c5edc3aaf69f (diff) | |
download | Ninja-f117cc16f6ecf991d16737472f75f9328aa423f0.zip Ninja-f117cc16f6ecf991d16737472f75f9328aa423f0.tar.gz Ninja-f117cc16f6ecf991d16737472f75f9328aa423f0.tar.bz2 |
Fix some Windows troubles.
Add parentheses so that constant does not overflow; include inttypes.h
when using MinGW to get the proper macros.
Diffstat (limited to 'src/win32port.h')
-rw-r--r-- | src/win32port.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/win32port.h b/src/win32port.h index 5464797..e542536 100644 --- a/src/win32port.h +++ b/src/win32port.h @@ -15,6 +15,13 @@ #ifndef NINJA_WIN32PORT_H_ #define NINJA_WIN32PORT_H_ +#if defined(__MINGW32__) || defined(__MINGW64__) +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif +#include <inttypes.h> +#endif + typedef signed short int16_t; typedef unsigned short uint16_t; /// A 64-bit integer type |