diff options
author | Mike Seplowitz <mseplowitz@bloomberg.net> | 2015-01-13 00:13:39 (GMT) |
---|---|---|
committer | Mike Seplowitz <mseplowitz@bloomberg.net> | 2015-08-19 12:43:58 (GMT) |
commit | 164e7f9494a7a9b9c6ec38b4cd4700bdb2aec1c5 (patch) | |
tree | 81abf3cf397497f8a3059b0b3bf344affcd4acdb /src | |
parent | da4e98b715c3e7cdf8bcc26f49868772daae7ff5 (diff) | |
download | Ninja-164e7f9494a7a9b9c6ec38b4cd4700bdb2aec1c5.zip Ninja-164e7f9494a7a9b9c6ec38b4cd4700bdb2aec1c5.tar.gz Ninja-164e7f9494a7a9b9c6ec38b4cd4700bdb2aec1c5.tar.bz2 |
Fix AIX compilation error related to printf macros
On AIX, inttypes.h gets indirectly included by build_log.h.
It's easiest just to ask for the printf format macros right away.
Diffstat (limited to 'src')
-rw-r--r-- | src/build_log.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/build_log.cc b/src/build_log.cc index 589c6da..8a52514 100644 --- a/src/build_log.cc +++ b/src/build_log.cc @@ -12,6 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +// On AIX, inttypes.h gets indirectly included by build_log.h. +// It's easiest just to ask for the printf format macros right away. +#ifndef _WIN32 +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif +#endif + #include "build_log.h" #include <errno.h> @@ -19,9 +27,6 @@ #include <string.h> #ifndef _WIN32 -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif #include <inttypes.h> #include <unistd.h> #endif |