MrSID Decode SDK for Raster Reference Manual  9.5.5.5244
lt_platform.h
Go to the documentation of this file.
1 //
2 // This code is property of Celartem, Inc dba Extensis.
3 // Copyright (c) 1995-2023. All rights reserved.
4 // Use permitted only under license from Extensis.
5 //
6 /* PUBLIC */
7 
8 
31 #ifndef LT_PLATFORM_H
32 #define LT_PLATFORM_H
33 
34 /* Check Compiler */
35 #if defined(__GNUC__) || defined(__GNUG__)
36  #define LT_COMPILER_GNU 1
37 
38  #if defined(__GNUC__)
39  #define LT_COMPILER_GCC 1
40  #endif
41  #if defined(__GNUG__)
42  #define LT_COMPILER_GXX 1
43  #endif
44 
45  #define LT_DEPRECATED(NEW) __attribute__ ((__deprecated__))
46 
47 #elif defined(_MSC_VER) && (1300 <= _MSC_VER && _MSC_VER <= 1999)
48 
49  #define LT_COMPILER_MS 1
50  #if _MSC_VER >= 1400
51  #define LT_DEPRECATED(NEW) __declspec(deprecated("was declared deprecated and replaced by "#NEW))
52  #else
53  #define LT_DEPRECATED(NEW)
54  #endif
55 
56 #else
57  #error PLATFORM ERROR: unknown compiler
58 #endif
59 
60 /* Check Architecture and Endian */
61 /* We do not define LT_BIG_ENDIAN, as that would just confuse things;
62  either you're little endian, or you're not. */
63 
64 #if defined(__ppc) || defined(__ppc__)
65  #define LT_ARCH_PPC 1
66 #elif defined(__ppc64) || defined(__ppc64__)
67  #define LT_ARCH_PPC64 1
68 #elif defined(__sparcv9) || defined(__sparcv9__)
69  #define LT_ARCH_SPARC64 1
70 #elif defined(__sparc) || defined(__sparcv9__)
71  #define LT_ARCH_SPARC 1
72 #elif defined(__i386__) || defined(i386) || \
73  defined(_M_IX86) || defined(_X86_) || defined(x86)
74  #define LT_ARCH_IA32 1
75  #define LT_LITTLE_ENDIAN
76 #elif defined(__x86_64) || defined(__x86_64__) || \
77  defined(__amd64) || defined(__amd64__) || \
78  defined(_M_AMD64)
79  #define LT_ARCH_AMD64 1 /* x86 w/ 64-extensions ("x86-64") */
80  #define LT_LITTLE_ENDIAN
81 #elif defined(__hppa__)
82  #define LT_ARCH_PARISC 1
83 #elif defined(_M_IX86)
84  #define LT_ARCH_IA64 1 /* Itanium */
85  #define LT_LITTLE_ENDIAN
86 #elif defined(ARM) || defined(_ARM_) || defined(__arm__)
87  #define LT_ARCH_ARM 1
88  #define LT_LITTLE_ENDIAN
89 #elif defined(__arm64) || defined(__arm64__) || defined (__ARM_NEON)
90  #define LT_ARCH_ARM64 1
91  #define LT_LITTLE_ENDIAN
92 #elif defined(__MIPSEL__)
93  #define LT_ARCH_MIPSEL 1
94  #define LT_LITTLE_ENDIAN
95 #else
96  #error PLATFORM ERROR: unknown architecture
97 #endif
98 
99 /* Check OS */
100 #if defined(_WIN64) || defined(WIN64)
101  #define LT_OS_WIN 1
102  #define LT_OS_WIN64 1
103 #elif defined(_WIN32_WCE)
104  #define LT_OS_WIN 1
105  #define LT_OS_WINCE 1
106 #elif defined(_WIN32) || defined(WIN32)
107  #define LT_OS_WIN 1
108  #define LT_OS_WIN32 1
109 #elif defined(__APPLE__) && defined(__MACH__)
110  #define LT_OS_UNIX 1
111  #define LT_OS_DARWIN 1
112 #elif defined (linux) || defined (__linux__) || defined (__linux)
113  #define LT_OS_UNIX 1
114  #define LT_OS_LINUX 1
115 #elif defined (__vxworks)
116  #define LT_OS_UNIX 1
117  #define LT_OS_VXWORKS 1
118 #else
119  #error PLATFORM ERROR: unsupported platform
120 #endif
121 
122 #if !defined(LT_OS_WIN) && !defined(LT_OS_UNIX)
123  #error PLATFORM ERROR: set LT_OS_WIN or LT_OS_UNIX
124 #endif
125 
126 /* backwards compatability, deprecated stuff */
127 
128 #if defined(LT_LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN)
129  /* this is deprecated! */
130  #define _LITTLE_ENDIAN
131 #endif
132 
133 #ifdef LT_OS_UNIX
134  #define LT_UNIX 1
135 #endif
136 
137 #endif /* LT_PLATFORM_H */

Extensis