Adding Peter Thatcher to the owners file.
[chromium-blink-merge.git] / third_party / qcms / src / qcmstypes.h
blobd58f6915355120339f075bec7c82dc8ca3438d3e
1 // qcms
2 // Copyright (C) 2009 Mozilla Foundation
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the "Software"),
6 // to deal in the Software without restriction, including without limitation
7 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 // and/or sell copies of the Software, and to permit persons to whom the Software
9 // is furnished to do so, subject to the following conditions:
11 // The above copyright notice and this permission notice shall be included in
12 // all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
16 // THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 #ifndef QCMS_TYPES_H
23 #define QCMS_TYPES_H
25 #if BYTE_ORDER == LITTLE_ENDIAN
26 #define IS_LITTLE_ENDIAN
27 #elif BYTE_ORDER == BIG_ENDIAN
28 #define IS_BIG_ENDIAN
29 #endif
31 /* all of the platforms that we use _MSC_VER on are little endian
32 * so this is sufficient for now */
33 #ifdef _MSC_VER
34 #define IS_LITTLE_ENDIAN
35 #endif
37 #ifdef __OS2__
38 #define IS_LITTLE_ENDIAN
39 #endif
41 #if !defined(IS_LITTLE_ENDIAN) && !defined(IS_BIG_ENDIAN)
42 #error Unknown endianess
43 #endif
45 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
46 # include <inttypes.h>
47 #elif defined (_MSC_VER) && _MSC_VER < 1600
48 typedef __int8 int8_t;
49 typedef unsigned __int8 uint8_t;
50 typedef __int16 int16_t;
51 typedef unsigned __int16 uint16_t;
52 typedef __int32 int32_t;
53 typedef unsigned __int32 uint32_t;
54 typedef __int64 int64_t;
55 typedef unsigned __int64 uint64_t;
56 #ifdef _WIN64
57 typedef unsigned __int64 uintptr_t;
58 #else
59 #pragma warning(push)
60 /* Disable benign redefinition of type warning 4142 */
61 #pragma warning(disable:4142)
62 typedef unsigned long uintptr_t;
63 /* Restore warnings */
64 #pragma warning(pop)
65 #endif
67 #elif defined (_AIX)
68 # include <sys/inttypes.h>
69 #else
70 # include <stdint.h>
71 #endif
73 typedef qcms_bool bool;
74 #define true 1
75 #define false 0
77 #endif