summaryrefslogtreecommitdiff
path: root/indra/llcommon/llpreprocessor.h
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2009-05-22 23:27:16 +0000
committerBrad Kittenbrink <brad@lindenlab.com>2009-05-22 23:27:16 +0000
commit01d390825a5d9ba37715b80cd0aa7aede022dcec (patch)
treec2d353bc8b7f22b6cf0c46329825f7e79882bd76 /indra/llcommon/llpreprocessor.h
parentcb5918df31cadc790d9259a024ab670b2998563b (diff)
DEV-27646 dll linkage for login module.
Ok, finally got this to a point where it doesn't break the build and I can check in. llcommon can be built as a shared library (disabled but can be enabled with cmake cache var LLCOMMON_LINK_SHARED. reviewed by Mani on tuesday (I still need to get his suggested changes re-reviewed)
Diffstat (limited to 'indra/llcommon/llpreprocessor.h')
-rw-r--r--indra/llcommon/llpreprocessor.h41
1 files changed, 30 insertions, 11 deletions
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 2e4fd4787a..5ff7814997 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -93,17 +93,6 @@
#endif
-// Deal with the differeneces on Windows
-#if LL_MSVC
-namespace snprintf_hack
-{
- int snprintf(char *str, size_t size, const char *format, ...);
-}
-
-// #define snprintf safe_snprintf /* Flawfinder: ignore */
-using snprintf_hack::snprintf;
-#endif // LL_MSVC
-
// Static linking with apr on windows needs to be declared.
#ifdef LL_WINDOWS
#ifndef APR_DECLARE_STATIC
@@ -133,6 +122,36 @@ using snprintf_hack::snprintf;
#pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
#pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
#pragma warning( disable : 4996 ) // warning: deprecated
+
+// level 4 warnings that we need to disable:
+#pragma warning (disable : 4100) // unreferenced formal parameter
+#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
+#pragma warning (disable : 4244) // possible loss of data on conversions
+#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
+#pragma warning (disable : 4512) // assignment operator could not be generated
+#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
+
+#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
+#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
#endif // LL_MSVC
+#if LL_WINDOWS
+#define LL_DLLEXPORT __declspec(dllexport)
+#define LL_DLLIMPORT __declspec(dllimport)
+#else
+#define LL_DLLEXPORT
+#define LL_DLLIMPORT
+#endif // LL_WINDOWS
+
+
+#if LL_COMMON_LINK_SHARED
+# if LL_COMMON_BUILD
+# define LL_COMMON_API LL_DLLEXPORT
+# else //LL_COMMON_BUILD
+# define LL_COMMON_API LL_DLLIMPORT
+# endif //LL_COMMON_BUILD
+#else // LL_COMMON_LINK_SHARED
+# define LL_COMMON_API
+#endif // LL_COMMON_LINK_SHARED
+
#endif // not LL_LINDEN_PREPROCESSOR_H