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#define PQXX_PRIVATE __declspec()
24#endif // PQXX_SHARED
25
26#ifdef _MSC_VER
27#pragma warning (disable: 4251 4275 4273)
28#pragma warning (disable: 4355)
29#pragma warning (disable: 4996) // Deprecation warning, e.g. about strncpy().
30#endif
31
32#elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_VISIBILITY) // !_WIN32
33
34#define PQXX_LIBEXPORT __attribute__ ((visibility("default")))
35#define PQXX_PRIVATE __attribute__ ((visibility("hidden")))
36
37#endif // __GNUC__ && PQXX_HAVE_GCC_VISIBILITY
38
39
40#include "pqxx/compiler-public.hxx"
41
42#endif