OLD | NEW |
(Empty) | |
| 1 #ifndef QCMS_TYPES_H |
| 2 #define QCMS_TYPES_H |
| 3 |
| 4 #ifdef MOZ_QCMS |
| 5 |
| 6 #include "prtypes.h" |
| 7 |
| 8 /* prtypes.h defines IS_LITTLE_ENDIAN and IS_BIG ENDIAN */ |
| 9 |
| 10 #if defined (__SVR4) && defined (__sun) |
| 11 /* int_types.h gets included somehow, so avoid redefining the types differently
*/ |
| 12 #include <sys/int_types.h> |
| 13 #elif defined (_AIX) |
| 14 #include <sys/types.h> |
| 15 #elif !defined(ANDROID) |
| 16 typedef PRInt8 int8_t; |
| 17 typedef PRUint8 uint8_t; |
| 18 typedef PRInt16 int16_t; |
| 19 typedef PRUint16 uint16_t; |
| 20 typedef PRInt32 int32_t; |
| 21 typedef PRUint32 uint32_t; |
| 22 typedef PRInt64 int64_t; |
| 23 typedef PRUint64 uint64_t; |
| 24 |
| 25 #ifdef __OS2__ |
| 26 /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't colli
de */ |
| 27 #include <stdlib.h> |
| 28 #elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED) |
| 29 typedef PRUptrdiff uintptr_t; |
| 30 #endif |
| 31 #endif |
| 32 |
| 33 #else // MOZ_QCMS |
| 34 |
| 35 #if BYTE_ORDER == LITTLE_ENDIAN |
| 36 #define IS_LITTLE_ENDIAN |
| 37 #elif BYTE_ORDER == BIG_ENDIAN |
| 38 #define IS_BIG_ENDIAN |
| 39 #endif |
| 40 |
| 41 /* all of the platforms that we use _MSC_VER on are little endian |
| 42 * so this is sufficient for now */ |
| 43 #ifdef _MSC_VER |
| 44 #define IS_LITTLE_ENDIAN |
| 45 #endif |
| 46 |
| 47 #ifdef __OS2__ |
| 48 #define IS_LITTLE_ENDIAN |
| 49 #endif |
| 50 |
| 51 #if !defined(IS_LITTLE_ENDIAN) && !defined(IS_BIG_ENDIAN) |
| 52 #error Unknown endianess |
| 53 #endif |
| 54 |
| 55 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi)
|| defined (__sun) || defined (sun) || defined (__digital__) |
| 56 # include <inttypes.h> |
| 57 #elif defined (_MSC_VER) |
| 58 typedef __int8 int8_t; |
| 59 typedef unsigned __int8 uint8_t; |
| 60 typedef __int16 int16_t; |
| 61 typedef unsigned __int16 uint16_t; |
| 62 typedef __int32 int32_t; |
| 63 typedef unsigned __int32 uint32_t; |
| 64 typedef __int64 int64_t; |
| 65 typedef unsigned __int64 uint64_t; |
| 66 #ifdef _WIN64 |
| 67 typedef unsigned __int64 uintptr_t; |
| 68 #else |
| 69 typedef unsigned long uintptr_t; |
| 70 #endif |
| 71 |
| 72 #elif defined (_AIX) |
| 73 # include <sys/inttypes.h> |
| 74 #else |
| 75 # include <stdint.h> |
| 76 #endif |
| 77 |
| 78 #endif |
| 79 |
| 80 typedef qcms_bool bool; |
| 81 #define true 1 |
| 82 #define false 0 |
| 83 |
| 84 #endif |
OLD | NEW |