libpqxx
compiler-internal.hxx
1 
11 #ifndef PQXX_H_COMPILER_INTERNAL
12 #define PQXX_H_COMPILER_INTERNAL
13 
14 
15 // Workarounds & definitions needed to compile libpqxx into a library
16 #include "pqxx/config-internal-compiler.h"
17 
18 #ifdef _WIN32
19 
20 #ifdef PQXX_SHARED
21 #undef PQXX_LIBEXPORT
22 #define PQXX_LIBEXPORT __declspec(dllexport)
23 // TODO: Does Windows have a way to "unexport" a symbol in an exported class?
24 #define PQXX_PRIVATE __declspec()
25 #endif // PQXX_SHARED
26 
27 #ifdef _MSC_VER
28 #pragma warning (disable: 4251 4275 4273)
29 #pragma warning (disable: 4355)
30 #pragma warning (disable: 4996) // Deprecation warning, e.g. about strncpy().
31 #endif
32 
33 #elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_VISIBILITY) // !_WIN32
34 
35 #define PQXX_LIBEXPORT __attribute__ ((visibility("default")))
36 #define PQXX_PRIVATE __attribute__ ((visibility("hidden")))
37 
38 #endif // __GNUC__ && PQXX_HAVE_GCC_VISIBILITY
39 
40 
41 #include "pqxx/compiler-public.hxx"
42 
43 #endif