00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef PQXX_COMPILER_H
00014 #define PQXX_COMPILER_H
00015
00016 #include "pqxx/config.h"
00017
00018 #ifdef BROKEN_ITERATOR
00019 namespace PGSTD
00020 {
00022 template<typename Cat,
00023 typename T,
00024 typename Dist,
00025 typename Ptr=T*,
00026 typename Ref=T&> struct iterator
00027 {
00028 typedef Cat iterator_category;
00029 typedef T value_type;
00030 typedef Dist difference_type;
00031 typedef Ptr pointer;
00032 typedef Ref reference;
00033 };
00034 }
00035 #else
00036 #include <iterator>
00037 #endif // BROKEN_ITERATOR
00038
00039
00040 #ifdef HAVE_LIMITS
00041 #include <limits>
00042 #else // HAVE_LIMITS
00043 #include <climits>
00044 namespace PGSTD
00045 {
00047 template<typename T> struct numeric_limits
00048 {
00049 static T max() throw ();
00050 static T min() throw ();
00051 };
00052
00053 template<> inline long numeric_limits<long>::max() throw () {return LONG_MAX;}
00054 template<> inline long numeric_limits<long>::min() throw () {return LONG_MIN;}
00055 }
00056 #endif // HAVE_LIMITS
00057
00058
00059
00060 #define PQXX_LIBEXPORT
00061
00062
00063 #ifdef _MSC_VER
00064
00065
00066 #pragma warning (disable: 4786)
00067
00068
00069 #pragma warning (disable: 4251 4275)
00070
00071
00072 #pragma comment(lib, "libpqdll")
00073
00074 #undef PQXX_LIBEXPORT
00075 #ifndef LIBPQXXDLL_EXPORTS // Defined in Makefile
00076 #define PQXX_LIBEXPORT __declspec(dllimport)
00077 #else
00078 #define PQXX_LIBEXPORT __declspec(dllexport)
00079 #endif // LIBPQXXDLL_EXPORTS
00080
00081 #endif // _MSC_VER
00082
00083
00084 #endif
00085