• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef NINJA_WIN32PORT_H_
16 #define NINJA_WIN32PORT_H_
17 
18 #if defined(__MINGW32__) || defined(__MINGW64__)
19 #ifndef __STDC_FORMAT_MACROS
20 #define __STDC_FORMAT_MACROS
21 #endif
22 #include <inttypes.h>
23 #endif
24 
25 typedef signed short int16_t;
26 typedef unsigned short uint16_t;
27 /// A 64-bit integer type
28 typedef signed long long int64_t;
29 typedef unsigned long long uint64_t;
30 
31 // printf format specifier for uint64_t, from C99.
32 #ifndef PRIu64
33 #define PRId64 "I64d"
34 #define PRIu64 "I64u"
35 #define PRIx64 "I64x"
36 #endif
37 
38 #endif // NINJA_WIN32PORT_H_
39 
40