00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef PQXX_COMPILER_H
00019 #define PQXX_COMPILER_H
00020
00021
00022
00023 #include "pqxx/config-internal-compiler.h"
00024
00025
00026 #include "pqxx/config-internal-libpq.h"
00027
00028 #ifdef _WIN32
00029
00030 #ifdef PQXX_SHARED
00031 #undef PQXX_LIBEXPORT
00032 #define PQXX_LIBEXPORT __declspec(dllexport)
00033
00034 #define PQXX_PRIVATE __declspec()
00035 #endif // PQXX_SHARED
00036
00037 #ifdef _MSC_VER
00038 #pragma warning (disable: 4251 4275 4273)
00039 #pragma warning (disable: 4258) // Complains that for-scope usage is correct
00040 #pragma warning (disable: 4290)
00041 #pragma warning (disable: 4355)
00042 #pragma warning (disable: 4786)
00043 #pragma warning (disable: 4800) // Performance warning for boolean conversions
00044 #endif
00045
00046 #elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_VISIBILITY) // !_WIN32
00047
00048 #define PQXX_LIBEXPORT __attribute__ ((visibility("default")))
00049 #define PQXX_PRIVATE __attribute__ ((visibility("hidden")))
00050
00051 #endif // __GNUC__ && PQXX_HAVE_GCC_VISIBILITY
00052
00053
00054 #include "pqxx/compiler-public.hxx"
00055
00056 #ifdef PQXX_HAVE_LIMITS
00057 #include <limits>
00058 #else // PQXX_HAVE_LIMITS
00059 #include <climits>
00060 namespace PGSTD
00061 {
00063 template<typename T> struct numeric_limits
00064 {
00065 static T max() throw ();
00066 static T min() throw ();
00067 };
00068 template<> inline long numeric_limits<long>::max() throw () {return LONG_MAX;}
00069 template<> inline long numeric_limits<long>::min() throw () {return LONG_MIN;}
00070 }
00071 #endif // PQXX_HAVE_LIMITS
00072
00073 #endif
00074