00001
00033 #ifndef LLPREPROCESSOR_H
00034 #define LLPREPROCESSOR_H
00035
00036
00037 #ifdef LL_LINUX
00038 #define __ENABLE_WSTRING
00039 #include <endian.h>
00040 #endif // LL_LINUX
00041
00042 #if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)))
00043 #define LL_LITTLE_ENDIAN 1
00044 #else
00045 #define LL_BIG_ENDIAN 1
00046 #endif
00047
00048
00049 #ifdef __GNUC__
00050 #define LL_FORCE_INLINE inline __attribute__((always_inline))
00051 #else
00052 #define LL_FORCE_INLINE __forceinline
00053 #endif
00054
00055
00056
00057 #if LL_DARWIN
00058 #define LL_QUICKTIME_ENABLED 1
00059 #define LL_LIBXUL_ENABLED 1
00060 #elif LL_WINDOWS
00061 #define LL_QUICKTIME_ENABLED 1
00062 #define LL_LIBXUL_ENABLED 1
00063 #elif LL_LINUX
00064 #define LL_QUICKTIME_ENABLED 0
00065 #ifndef LL_LIBXUL_ENABLED
00066 #define LL_LIBXUL_ENABLED 1
00067 #endif // def LL_LIBXUL_ENABLED
00068 #elif LL_SOLARIS
00069 #define LL_QUICKTIME_ENABLED 0
00070 #ifndef LL_LIBXUL_ENABLED
00071 #define LL_LIBXUL_ENABLED 0
00072 #endif // def LL_LIBXUL_ENABLED
00073 #endif
00074
00075 #if LL_LIBXUL_ENABLED && !defined(MOZILLA_INTERNAL_API)
00076
00077
00078
00079 #define MOZILLA_INTERNAL_API 1
00080 #endif
00081
00082
00083 #if defined(__GNUC__)
00084 #define GCC_VERSION (__GNUC__ * 10000 \
00085 + __GNUC_MINOR__ * 100 \
00086 + __GNUC_PATCHLEVEL__)
00087 #ifndef LL_GNUC
00088 #define LL_GNUC 1
00089 #endif
00090 #elif defined(__MSVC_VER__) || defined(_MSC_VER)
00091 #ifndef LL_MSVC
00092 #define LL_MSVC 1
00093 #endif
00094 #endif
00095
00096
00097 #if LL_DARWIN || LL_LINUX
00098
00099 #define stricmp strcasecmp
00100 #define strnicmp strncasecmp
00101
00102
00103 #ifndef MAX_PATH
00104 #define MAX_PATH PATH_MAX
00105 #endif // not MAX_PATH
00106
00107 #endif
00108
00109
00110 #if LL_MSVC
00111 #define snprintf safe_snprintf
00112 #endif // LL_MSVC
00113
00114
00115 #ifdef LL_WINDOWS
00116 #ifndef APR_DECLARE_STATIC
00117 #define APR_DECLARE_STATIC // For APR on Windows
00118 #endif
00119 #ifndef APU_DECLARE_STATIC
00120 #define APU_DECLARE_STATIC // For APR util on Windows
00121 #endif
00122 #endif
00123
00124 #if defined(LL_WINDOWS)
00125 #define BOOST_REGEX_NO_LIB 1
00126 #define CURL_STATICLIB 1
00127
00128
00129
00130 #endif // LL_WINDOWS
00131
00132
00133
00134 #if LL_MSVC
00135 #pragma warning( 3 : 4701 ) // "local variable used without being initialized" Treat this as level 3, not level 4.
00136 #pragma warning( 3 : 4702 ) // "unreachable code" Treat this as level 3, not level 4.
00137 #pragma warning( 3 : 4189 ) // "local variable initialized but not referenced" Treat this as level 3, not level 4.
00138
00139 #pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual"
00140 #pragma warning( disable : 4786 ) // silly MS warning deep inside their <map> include file
00141 #pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file
00142 #pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
00143 #pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
00144 #pragma warning( disable : 4996 ) // warning: deprecated
00145 #endif // LL_MSVC
00146
00147 #endif // not LL_LINDEN_PREPROCESSOR_H