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.
1 #ifndef QCMS_TYPES_H
2 #define QCMS_TYPES_H
4 #if BYTE_ORDER == LITTLE_ENDIAN
5 #define IS_LITTLE_ENDIAN
6 #elif BYTE_ORDER == BIG_ENDIAN
7 #define IS_BIG_ENDIAN
8 #endif
10 /* all of the platforms that we use _MSC_VER on are little endian
11 * so this is sufficient for now */
12 #ifdef _MSC_VER
13 #define IS_LITTLE_ENDIAN
14 #endif
16 #ifdef __OS2__
17 #define IS_LITTLE_ENDIAN
18 #endif
20 #if !defined(IS_LITTLE_ENDIAN) && !defined(IS_BIG_ENDIAN)
21 #error Unknown endianess
22 #endif
24 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
25 # include <inttypes.h>
26 #elif defined (_MSC_VER) && _MSC_VER < 1600
27 typedef __int8 int8_t;
28 typedef unsigned __int8 uint8_t;
29 typedef __int16 int16_t;
30 typedef unsigned __int16 uint16_t;
31 typedef __int32 int32_t;
32 typedef unsigned __int32 uint32_t;
33 typedef __int64 int64_t;
34 typedef unsigned __int64 uint64_t;
35 #ifdef _WIN64
36 typedef unsigned __int64 uintptr_t;
37 #else
38 typedef unsigned long uintptr_t;
39 #endif
41 #elif defined (_AIX)
42 # include <sys/inttypes.h>
43 #else
44 # include <stdint.h>
45 #endif
47 typedef qcms_bool bool;
48 #define true 1
49 #define false 0
51 #endif