MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

lt_platform.h
Go to the documentation of this file.
1 /* $Id$ */
2 /* //////////////////////////////////////////////////////////////////////////
3 // //
4 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
5 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6 // prohibited. Access to and use of this code is permitted only under //
7 // license from LizardTech, Inc. Portions of the code are protected by //
8 // US and foreign patents and other filings. All Rights Reserved. //
9 // //
11 /* PUBLIC */
12
13
36 #ifndef LT_PLATFORM_H
37 #define LT_PLATFORM_H
38
39 /* Check Compiler */
40 #if (defined(__GNUC__) || defined(__GNUG__)) && (3 <= __GNUC__ && __GNUC__ <= 5)
41 #define LT_COMPILER_GNU 1
42
43 #if defined(__GNUC__)
44 #define LT_COMPILER_GCC 1
45 #endif
46 #if defined(__GNUG__)
47 #define LT_COMPILER_GXX 1
48 #endif
49
50 #if(__GNUC__ == 3)
51 #define LT_COMPILER_GCC3 1
52 #elif(__GNUC__ == 4)
53 #define LT_COMPILER_GCC4 1
54 #else
55 #define LT_COMPILER_GCC5 1
56 #endif
57
58 #define LT_DEPRECATED(NEW) __attribute__ ((__deprecated__))
59
60 #elif defined (__SUNPRO_CC) || defined(__SUNPRO_C)
61 #define LT_COMPILER_SUN 1
62
63 #if defined (__SUNPRO_CC)
64 #define LT_COMPILER_SUNPRO_CC 1
65 #endif
66 #if defined(__SUNPRO_C)
67 #define LT_COMPILER_SUNPRO_C 1
68 #endif
69
70 #define LT_DEPRECATED(NEW)
71
72 #elif defined(_MSC_VER) && (1300 <= _MSC_VER && _MSC_VER <= 1910)
73 #define LT_COMPILER_MS 1
74 #if _MSC_VER < 1400
75 #define LT_COMPILER_MS7 1
76 #elif _MSC_VER < 1500
77 #define LT_COMPILER_MS8 1
78 #elif _MSC_VER < 1600
79 #define LT_COMPILER_MS9 1
80 #elif _MSC_VER < 1700
81 #define LT_COMPILER_MS10 1
82 #elif _MSC_VER < 1800
83 #define LT_COMPILER_MS11 1
84 #elif _MSC_VER < 1900
85 #define LT_COMPILER_MS12 1
86 #elif _MSC_VER < 1910
87 #define LT_COMPILER_MS14 1
88 #else
89 #define LT_COMPILER_MS17 1
90 #endif
91
92 #if !defined(_CRT_SECURE_NO_DEPRECATE) && _MSC_VER >= 1400
93 #define _CRT_SECURE_NO_DEPRECATE
94 #define _CRT_SECURE_NO_WARNINGS
95 #define _CRT_NONSTDC_NO_WARNINGS
96 #define LT_DEPRECATED(NEW) __declspec(deprecated("was declared deprecated and replaced by "#NEW))
97 #else
98 #define LT_DEPRECATED(NEW)
99 #endif
100
101 #else
102 #error PLATFORM ERROR: unknown compiler
103 #endif
104
105 /* Check Architecture and Endian */
106 /* We do not define LT_BIG_ENDIAN, as that would just confuse things;
107 either you're little endian, or you're not. */
108
109 #if defined(__ppc) || defined(__ppc__)
110 #define LT_ARCH_PPC 1
111 #elif defined(__ppc64) || defined(__ppc64__)
112 #define LT_ARCH_PPC64 1
113 #elif defined(__sparcv9) || defined(__sparcv9__)
114 #define LT_ARCH_SPARC64 1
115 #elif defined(__sparc) || defined(__sparcv9__)
116 #define LT_ARCH_SPARC 1
117 #elif defined(__i386__) || defined(i386) || \
118 defined(_M_IX86) || defined(_X86_) || defined(x86)
119 #define LT_ARCH_IA32 1
120 #define LT_LITTLE_ENDIAN
121 #elif defined(__x86_64) || defined(__x86_64__) || \
122 defined(__amd64) || defined(__amd64__) || \
123 defined(_M_AMD64)
124 #define LT_ARCH_AMD64 1 /* x86 w/ 64-extensions ("x86-64") */
125 #define LT_LITTLE_ENDIAN
126 #elif defined(__hppa__)
127 #define LT_ARCH_PARISC 1
128 #elif defined(_M_IX86)
129 #define LT_ARCH_IA64 1 /* Itanium */
130 #define LT_LITTLE_ENDIAN
131 #elif defined(ARM) || defined(_ARM_) || defined(__arm__)
132 #define LT_ARCH_ARM 1
133 #define LT_LITTLE_ENDIAN
134 #elif defined(__arm64) || defined(__arm64__) || defined (__ARM_NEON)
135 #define LT_ARCH_ARM64 1
136 #define LT_LITTLE_ENDIAN
137 #elif defined(__MIPSEL__)
138 #define LT_ARCH_MIPSEL 1
139 #define LT_LITTLE_ENDIAN
140 #else
141 #error PLATFORM ERROR: unknown architecture
142 #endif
143
144 /* Check OS */
145 #if defined(_WIN64) || defined(WIN64)
146 #define LT_OS_WIN 1
147 #define LT_OS_WIN64 1
148 #elif defined(_WIN32_WCE)
149 #define LT_OS_WIN 1
150 #define LT_OS_WINCE 1
151 #elif defined(_WIN32) || defined(WIN32)
152 #define LT_OS_WIN 1
153 #define LT_OS_WIN32 1
154 #elif defined(__APPLE__) && defined(__MACH__)
155 #define LT_OS_UNIX 1
156 #define LT_OS_DARWIN 1
157 #elif defined(__hpux)
158 #define LT_OS_UNIX 1
159 #define LT_OS_HPUX 1
160 #elif defined (__sun)
161 #define LT_OS_UNIX 1
162 #define LT_OS_SUNOS 1
163 #elif defined (linux) || defined (__linux__) || defined (__linux)
164 #define LT_OS_UNIX 1
165 #define LT_OS_LINUX 1
166 #else
167 #error PLATFORM ERROR: unsupported platform
168 #endif
169
170 #if !defined(LT_OS_WIN) && !defined(LT_OS_UNIX)
171 #error PLATFORM ERROR: set LT_OS_WIN or LT_OS_UNIX
172 #endif
173
174 /* backwards compatability, deprecated stuff */
175
176 #if defined(LT_LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN)
177 /* this is deprecated! */
178 #define _LITTLE_ENDIAN
179 #endif
180
181 #ifdef LT_OS_UNIX
182 #define LT_UNIX 1
183 #endif
184
185 #endif /* LT_PLATFORM_H */
186

LizardTech