Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | #ifndef QCMS_TYPES_H |
michael@0 | 2 | #define QCMS_TYPES_H |
michael@0 | 3 | |
michael@0 | 4 | #if BYTE_ORDER == LITTLE_ENDIAN |
michael@0 | 5 | #define IS_LITTLE_ENDIAN |
michael@0 | 6 | #elif BYTE_ORDER == BIG_ENDIAN |
michael@0 | 7 | #define IS_BIG_ENDIAN |
michael@0 | 8 | #endif |
michael@0 | 9 | |
michael@0 | 10 | /* all of the platforms that we use _MSC_VER on are little endian |
michael@0 | 11 | * so this is sufficient for now */ |
michael@0 | 12 | #ifdef _MSC_VER |
michael@0 | 13 | #define IS_LITTLE_ENDIAN |
michael@0 | 14 | #endif |
michael@0 | 15 | |
michael@0 | 16 | #ifdef __OS2__ |
michael@0 | 17 | #define IS_LITTLE_ENDIAN |
michael@0 | 18 | #endif |
michael@0 | 19 | |
michael@0 | 20 | #if !defined(IS_LITTLE_ENDIAN) && !defined(IS_BIG_ENDIAN) |
michael@0 | 21 | #error Unknown endianess |
michael@0 | 22 | #endif |
michael@0 | 23 | |
michael@0 | 24 | #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__) |
michael@0 | 25 | # include <inttypes.h> |
michael@0 | 26 | #elif defined (_MSC_VER) && _MSC_VER < 1600 |
michael@0 | 27 | typedef __int8 int8_t; |
michael@0 | 28 | typedef unsigned __int8 uint8_t; |
michael@0 | 29 | typedef __int16 int16_t; |
michael@0 | 30 | typedef unsigned __int16 uint16_t; |
michael@0 | 31 | typedef __int32 int32_t; |
michael@0 | 32 | typedef unsigned __int32 uint32_t; |
michael@0 | 33 | typedef __int64 int64_t; |
michael@0 | 34 | typedef unsigned __int64 uint64_t; |
michael@0 | 35 | #ifdef _WIN64 |
michael@0 | 36 | typedef unsigned __int64 uintptr_t; |
michael@0 | 37 | #else |
michael@0 | 38 | typedef unsigned long uintptr_t; |
michael@0 | 39 | #endif |
michael@0 | 40 | |
michael@0 | 41 | #elif defined (_AIX) |
michael@0 | 42 | # include <sys/inttypes.h> |
michael@0 | 43 | #else |
michael@0 | 44 | # include <stdint.h> |
michael@0 | 45 | #endif |
michael@0 | 46 | |
michael@0 | 47 | typedef qcms_bool bool; |
michael@0 | 48 | #define true 1 |
michael@0 | 49 | #define false 0 |
michael@0 | 50 | |
michael@0 | 51 | #endif |