MrSID Decode SDK for Raster Reference Manual
9.1.0.4045
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__ <= 4)
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
#else
53
#define LT_COMPILER_GCC4 1
54
#endif
55
56
#define LT_DEPRECATED(NEW) __attribute__ ((__deprecated__))
57
58
#elif defined (__SUNPRO_CC) || defined(__SUNPRO_C)
59
#define LT_COMPILER_SUN 1
60
61
#if defined (__SUNPRO_CC)
62
#define LT_COMPILER_SUNPRO_CC 1
63
#endif
64
#if defined(__SUNPRO_C)
65
#define LT_COMPILER_SUNPRO_C 1
66
#endif
67
68
#define LT_DEPRECATED(NEW)
69
70
#elif defined(_MSC_VER) && (1300 <= _MSC_VER && _MSC_VER <= 1800)
71
#define LT_COMPILER_MS 1
72
#if _MSC_VER < 1400
73
#define LT_COMPILER_MS7 1
74
#elif _MSC_VER < 1500
75
#define LT_COMPILER_MS8 1
76
#elif _MSC_VER < 1600
77
#define LT_COMPILER_MS9 1
78
#elif _MSC_VER < 1700
79
#define LT_COMPILER_MS10 1
80
#elif _MSC_VER < 1800
81
#define LT_COMPILER_MS11 1
82
#else
83
#define LT_COMPILER_MS12 1
84
#endif
85
86
#if !defined(_CRT_SECURE_NO_DEPRECATE) && _MSC_VER >= 1400
87
#define _CRT_SECURE_NO_DEPRECATE
88
#define _CRT_SECURE_NO_WARNINGS
89
#define _CRT_NONSTDC_NO_WARNINGS
90
#define LT_DEPRECATED(NEW) __declspec(deprecated("was declared deprecated and replaced by "#NEW))
91
#else
92
#define LT_DEPRECATED(NEW)
93
#endif
94
95
#else
96
#error PLATFORM ERROR: unknown compiler
97
#endif
98
99
/* Check Architecture and Endian */
100
/* We do not define LT_BIG_ENDIAN, as that would just confuse things;
101
either you're little endian, or you're not. */
102
103
#if defined(__ppc) || defined(__ppc__)
104
#define LT_ARCH_PPC 1
105
#elif defined(__ppc64) || defined(__ppc64__)
106
#define LT_ARCH_PPC64 1
107
#elif defined(__sparcv9) || defined(__sparcv9__)
108
#define LT_ARCH_SPARC64 1
109
#elif defined(__sparc) || defined(__sparcv9__)
110
#define LT_ARCH_SPARC 1
111
#elif defined(__i386__) || defined(i386) || \
112
defined(_M_IX86) || defined(_X86_) || defined(x86)
113
#define LT_ARCH_IA32 1
114
#define LT_LITTLE_ENDIAN
115
#elif defined(__x86_64) || defined(__x86_64__) || \
116
defined(__amd64) || defined(__amd64__) || \
117
defined(_M_AMD64)
118
#define LT_ARCH_AMD64 1
/* x86 w/ 64-extensions ("x86-64") */
119
#define LT_LITTLE_ENDIAN
120
#elif defined(__hppa__)
121
#define LT_ARCH_PARISC 1
122
#elif defined(_M_IX86)
123
#define LT_ARCH_IA64 1
/* Itanium */
124
#define LT_LITTLE_ENDIAN
125
#elif defined(ARM) || defined(_ARM_) || defined(__arm__)
126
#define LT_ARCH_ARM 1
127
#define LT_LITTLE_ENDIAN
128
#elif defined(__arm64) || defined(__arm64__)
129
#define LT_ARCH_ARM64 1
130
#define LT_LITTLE_ENDIAN
131
#else
132
#error PLATFORM ERROR: unknown architecture
133
#endif
134
135
/* Check OS */
136
#if defined(_WIN64) || defined(WIN64)
137
#define LT_OS_WIN 1
138
#define LT_OS_WIN64 1
139
#elif defined(_WIN32_WCE)
140
#define LT_OS_WIN 1
141
#define LT_OS_WINCE 1
142
#elif defined(_WIN32) || defined(WIN32)
143
#define LT_OS_WIN 1
144
#define LT_OS_WIN32 1
145
#elif defined(__APPLE__) && defined(__MACH__)
146
#define LT_OS_UNIX 1
147
#define LT_OS_DARWIN 1
148
#elif defined(__hpux)
149
#define LT_OS_UNIX 1
150
#define LT_OS_HPUX 1
151
#elif defined (__sun)
152
#define LT_OS_UNIX 1
153
#define LT_OS_SUNOS 1
154
#elif defined (linux) || defined (__linux__) || defined (__linux)
155
#define LT_OS_UNIX 1
156
#define LT_OS_LINUX 1
157
#else
158
#error PLATFORM ERROR: unsupported platform
159
#endif
160
161
#if !defined(LT_OS_WIN) && !defined(LT_OS_UNIX)
162
#error PLATFORM ERROR: set LT_OS_WIN or LT_OS_UNIX
163
#endif
164
165
/* backwards compatability, deprecated stuff */
166
167
#if defined(LT_LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN)
168
/* this is deprecated! */
169
#define _LITTLE_ENDIAN
170
#endif
171
172
#ifdef LT_OS_UNIX
173
#define LT_UNIX 1
174
#endif
175
176
#endif
/* LT_PLATFORM_H */
177
LizardTech