aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llpreprocessor.h
diff options
context:
space:
mode:
authorAleric Inglewood2010-11-07 16:55:50 +0100
committerAleric Inglewood2010-11-07 18:27:48 +0100
commit5b4356cefbaa7dbdc8656e7283c110a893b1a89c (patch)
tree43fae9945562c3281746370d623877840ed884b2 /linden/indra/llcommon/llpreprocessor.h
parentIMP-688: ERROR: getString: Invalid string control nick01 (diff)
downloadmeta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.zip
meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.gz
meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.bz2
meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.xz
IMP-692: SNOW-713: Global objects in libllcommon duplicated in plugins
See http://jira.secondlife.com/browse/SNOW-713 This patch makes llcommon shared. It contains the following snowglobe (SVN) changesets: 3478, 3479, 3480, 3481, 3482, 3485, 3496, 3498, 3500, 3519 and 3531, plus the fix for all rejects. Note that changes to scripts/automated_build_scripts/opensrc-build.sh (changesets 3500 and 3625) were ignored as we don't have scripts/automated_build_scripts.
Diffstat (limited to 'linden/indra/llcommon/llpreprocessor.h')
-rw-r--r--linden/indra/llcommon/llpreprocessor.h62
1 files changed, 39 insertions, 23 deletions
diff --git a/linden/indra/llcommon/llpreprocessor.h b/linden/indra/llcommon/llpreprocessor.h
index 2e4fd47..6886e3a 100644
--- a/linden/indra/llcommon/llpreprocessor.h
+++ b/linden/indra/llcommon/llpreprocessor.h
@@ -92,47 +92,63 @@
92 92
93#endif 93#endif
94 94
95
96// Deal with the differeneces on Windows 95// Deal with the differeneces on Windows
97#if LL_MSVC
98namespace snprintf_hack
99{
100 int snprintf(char *str, size_t size, const char *format, ...);
101}
102
103// #define snprintf safe_snprintf /* Flawfinder: ignore */
104using snprintf_hack::snprintf;
105#endif // LL_MSVC
106
107// Static linking with apr on windows needs to be declared.
108#ifdef LL_WINDOWS
109#ifndef APR_DECLARE_STATIC
110#define APR_DECLARE_STATIC // For APR on Windows
111#endif
112#ifndef APU_DECLARE_STATIC
113#define APU_DECLARE_STATIC // For APR util on Windows
114#endif
115#endif
116
117#if defined(LL_WINDOWS) 96#if defined(LL_WINDOWS)
118#define BOOST_REGEX_NO_LIB 1 97#define BOOST_REGEX_NO_LIB 1
119#define CURL_STATICLIB 1 98#define CURL_STATICLIB 1
120#define XML_STATIC 99#define XML_STATIC
121#endif // LL_WINDOWS 100#endif // LL_WINDOWS
122 101
123
124// Deal with VC6 problems 102// Deal with VC6 problems
125#if LL_MSVC 103#if LL_MSVC
126#pragma warning( 3 : 4701 ) // "local variable used without being initialized" Treat this as level 3, not level 4. 104#pragma warning( 3 : 4701 ) // "local variable used without being initialized" Treat this as level 3, not level 4.
127#pragma warning( 3 : 4702 ) // "unreachable code" Treat this as level 3, not level 4. 105#pragma warning( 3 : 4702 ) // "unreachable code" Treat this as level 3, not level 4.
128#pragma warning( 3 : 4189 ) // "local variable initialized but not referenced" Treat this as level 3, not level 4. 106#pragma warning( 3 : 4189 ) // "local variable initialized but not referenced" Treat this as level 3, not level 4.
129//#pragma warning( 3 : 4018 ) // "signed/unsigned mismatch" Treat this as level 3, not level 4. 107//#pragma warning( 3 : 4018 ) // "signed/unsigned mismatch" Treat this as level 3, not level 4.
108#pragma warning( 3 : 4263 ) // 'function' : member function does not override any base class virtual member function
109#pragma warning( 3 : 4264 ) // "'virtual_function' : no override available for virtual member function from base 'class'; function is hidden"
130#pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual" 110#pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual"
131#pragma warning( disable : 4786 ) // silly MS warning deep inside their <map> include file 111//#pragma warning( disable : 4265 ) // boost 1.36.0, non-virtual destructor in boost::exception_detail::*
112#pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden
113#pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
132#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file 114#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file
133#pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation. 115#pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
134#pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning) 116#pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
135#pragma warning( disable : 4996 ) // warning: deprecated 117#pragma warning( disable : 4996 ) // warning: deprecated
118
119// Linker optimization with "extern template" generates these warnings
120#pragma warning( disable : 4231 ) // nonstandard extension used : 'extern' before template explicit instantiation
121#pragma warning( disable : 4506 ) // no definition for inline function
122
123// level 4 warnings that we need to disable:
124#pragma warning (disable : 4100) // unreferenced formal parameter
125#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
126#pragma warning (disable : 4244) // possible loss of data on conversions
127#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
128#pragma warning (disable : 4512) // assignment operator could not be generated
129#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
130
131#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
132#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
136#endif // LL_MSVC 133#endif // LL_MSVC
137 134
135#if LL_WINDOWS
136#define LL_DLLEXPORT __declspec(dllexport)
137#define LL_DLLIMPORT __declspec(dllimport)
138#elif LL_LINUX
139#define LL_DLLEXPORT __attribute__ ((visibility("default")))
140#define LL_DLLIMPORT
141#else
142#define LL_DLLEXPORT
143#define LL_DLLIMPORT
144#endif // LL_WINDOWS
145
146#ifdef llcommon_EXPORTS
147// Compiling llcommon (shared)
148#define LL_COMMON_API LL_DLLEXPORT
149#else // llcommon_EXPORTS
150// Using llcommon (shared)
151#define LL_COMMON_API LL_DLLIMPORT
152#endif // llcommon_EXPORTS
153
138#endif // not LL_LINDEN_PREPROCESSOR_H 154#endif // not LL_LINDEN_PREPROCESSOR_H