MrSID Decode SDK for Raster Reference Manual
9.5.1.4427
|
00001 /* $Id$ */ 00002 /* ////////////////////////////////////////////////////////////////////////// 00003 // // 00004 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, // 00005 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution // 00006 // prohibited. Access to and use of this code is permitted only under // 00007 // license from LizardTech, Inc. Portions of the code are protected by // 00008 // US and foreign patents and other filings. All Rights Reserved. // 00009 // // 00011 /* PUBLIC */ 00012 00013 00036 #ifndef LT_PLATFORM_H 00037 #define LT_PLATFORM_H 00038 00039 /* Check Compiler */ 00040 #if (defined(__GNUC__) || defined(__GNUG__)) && (3 <= __GNUC__ && __GNUC__ <= 4) 00041 #define LT_COMPILER_GNU 1 00042 00043 #if defined(__GNUC__) 00044 #define LT_COMPILER_GCC 1 00045 #endif 00046 #if defined(__GNUG__) 00047 #define LT_COMPILER_GXX 1 00048 #endif 00049 00050 #if(__GNUC__ == 3) 00051 #define LT_COMPILER_GCC3 1 00052 #else 00053 #define LT_COMPILER_GCC4 1 00054 #endif 00055 00056 #define LT_DEPRECATED(NEW) __attribute__ ((__deprecated__)) 00057 00058 #elif defined (__SUNPRO_CC) || defined(__SUNPRO_C) 00059 #define LT_COMPILER_SUN 1 00060 00061 #if defined (__SUNPRO_CC) 00062 #define LT_COMPILER_SUNPRO_CC 1 00063 #endif 00064 #if defined(__SUNPRO_C) 00065 #define LT_COMPILER_SUNPRO_C 1 00066 #endif 00067 00068 #define LT_DEPRECATED(NEW) 00069 00070 #elif defined(_MSC_VER) && (1300 <= _MSC_VER && _MSC_VER <= 1900) 00071 #define LT_COMPILER_MS 1 00072 #if _MSC_VER < 1400 00073 #define LT_COMPILER_MS7 1 00074 #elif _MSC_VER < 1500 00075 #define LT_COMPILER_MS8 1 00076 #elif _MSC_VER < 1600 00077 #define LT_COMPILER_MS9 1 00078 #elif _MSC_VER < 1700 00079 #define LT_COMPILER_MS10 1 00080 #elif _MSC_VER < 1800 00081 #define LT_COMPILER_MS11 1 00082 #elif _MSC_VER < 1900 00083 #define LT_COMPILER_MS12 1 00084 #else 00085 #define LT_COMPILER_MS14 1 00086 #endif 00087 00088 #if !defined(_CRT_SECURE_NO_DEPRECATE) && _MSC_VER >= 1400 00089 #define _CRT_SECURE_NO_DEPRECATE 00090 #define _CRT_SECURE_NO_WARNINGS 00091 #define _CRT_NONSTDC_NO_WARNINGS 00092 #define LT_DEPRECATED(NEW) __declspec(deprecated("was declared deprecated and replaced by "#NEW)) 00093 #else 00094 #define LT_DEPRECATED(NEW) 00095 #endif 00096 00097 #else 00098 #error PLATFORM ERROR: unknown compiler 00099 #endif 00100 00101 /* Check Architecture and Endian */ 00102 /* We do not define LT_BIG_ENDIAN, as that would just confuse things; 00103 either you're little endian, or you're not. */ 00104 00105 #if defined(__ppc) || defined(__ppc__) 00106 #define LT_ARCH_PPC 1 00107 #elif defined(__ppc64) || defined(__ppc64__) 00108 #define LT_ARCH_PPC64 1 00109 #elif defined(__sparcv9) || defined(__sparcv9__) 00110 #define LT_ARCH_SPARC64 1 00111 #elif defined(__sparc) || defined(__sparcv9__) 00112 #define LT_ARCH_SPARC 1 00113 #elif defined(__i386__) || defined(i386) || \ 00114 defined(_M_IX86) || defined(_X86_) || defined(x86) 00115 #define LT_ARCH_IA32 1 00116 #define LT_LITTLE_ENDIAN 00117 #elif defined(__x86_64) || defined(__x86_64__) || \ 00118 defined(__amd64) || defined(__amd64__) || \ 00119 defined(_M_AMD64) 00120 #define LT_ARCH_AMD64 1 /* x86 w/ 64-extensions ("x86-64") */ 00121 #define LT_LITTLE_ENDIAN 00122 #elif defined(__hppa__) 00123 #define LT_ARCH_PARISC 1 00124 #elif defined(_M_IX86) 00125 #define LT_ARCH_IA64 1 /* Itanium */ 00126 #define LT_LITTLE_ENDIAN 00127 #elif defined(ARM) || defined(_ARM_) || defined(__arm__) 00128 #define LT_ARCH_ARM 1 00129 #define LT_LITTLE_ENDIAN 00130 #elif defined(__arm64) || defined(__arm64__) 00131 #define LT_ARCH_ARM64 1 00132 #define LT_LITTLE_ENDIAN 00133 #elif defined(__MIPSEL__) 00134 #define LT_ARCH_MIPSEL 1 00135 #define LT_LITTLE_ENDIAN 00136 #else 00137 #error PLATFORM ERROR: unknown architecture 00138 #endif 00139 00140 /* Check OS */ 00141 #if defined(_WIN64) || defined(WIN64) 00142 #define LT_OS_WIN 1 00143 #define LT_OS_WIN64 1 00144 #elif defined(_WIN32_WCE) 00145 #define LT_OS_WIN 1 00146 #define LT_OS_WINCE 1 00147 #elif defined(_WIN32) || defined(WIN32) 00148 #define LT_OS_WIN 1 00149 #define LT_OS_WIN32 1 00150 #elif defined(__APPLE__) && defined(__MACH__) 00151 #define LT_OS_UNIX 1 00152 #define LT_OS_DARWIN 1 00153 #elif defined(__hpux) 00154 #define LT_OS_UNIX 1 00155 #define LT_OS_HPUX 1 00156 #elif defined (__sun) 00157 #define LT_OS_UNIX 1 00158 #define LT_OS_SUNOS 1 00159 #elif defined (linux) || defined (__linux__) || defined (__linux) 00160 #define LT_OS_UNIX 1 00161 #define LT_OS_LINUX 1 00162 #else 00163 #error PLATFORM ERROR: unsupported platform 00164 #endif 00165 00166 #if !defined(LT_OS_WIN) && !defined(LT_OS_UNIX) 00167 #error PLATFORM ERROR: set LT_OS_WIN or LT_OS_UNIX 00168 #endif 00169 00170 /* backwards compatability, deprecated stuff */ 00171 00172 #if defined(LT_LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN) 00173 /* this is deprecated! */ 00174 #define _LITTLE_ENDIAN 00175 #endif 00176 00177 #ifdef LT_OS_UNIX 00178 #define LT_UNIX 1 00179 #endif 00180 00181 #endif /* LT_PLATFORM_H */ 00182