00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef PQXX_LIBCOMPILER_H
00018 #define PQXX_LIBCOMPILER_H
00019
00020
00021 #include "pqxx/config-public-compiler.h"
00022
00023
00024 #ifdef PQXX_BROKEN_ITERATOR
00025 #include <cstddef>
00026 #include <cstdlib>
00028
00036 namespace PGSTD
00037 {
00039 template<typename Cat,
00040 typename T,
00041 typename Dist,
00042 typename Ptr=T*,
00043 typename Ref=T&> struct iterator
00044 {
00045 typedef Cat iterator_category;
00046 typedef T value_type;
00047 typedef Dist difference_type;
00048 typedef Ptr pointer;
00049 typedef Ref reference;
00050 };
00051 }
00052 #else
00053 #include <iterator>
00054 #endif // PQXX_BROKEN_ITERATOR
00055
00056 #ifndef PQXX_HAVE_CHAR_TRAITS
00057 #include <cstddef>
00058 namespace PGSTD
00059 {
00061 template<typename CHAR> struct char_traits {};
00063 template<> struct char_traits<char>
00064 {
00065 typedef int int_type;
00066 typedef size_t pos_type;
00067 typedef long off_type;
00068 typedef char char_type;
00069
00070 static int_type eof() { return -1; }
00071 };
00073 template<> struct char_traits<unsigned char>
00074 {
00075 typedef int int_type;
00076 typedef size_t pos_type;
00077 typedef long off_type;
00078 typedef unsigned char char_type;
00079
00080 static int_type eof() { return -1; }
00081 };
00082 }
00083 #endif
00084
00085
00086 #if defined(__SUNPRO_CC)
00087 #if __SUNPRO_CC_COMPAT < 5
00088 #error "This compiler version is not capable of building libpqxx."
00089 #endif // __SUNPRO_CC_COMPAT < 5
00090 #endif // __SUNPRO_CC
00091
00092
00093
00094 #if defined(__DECCXX_VER)
00095 #define __USE_STD_IOSTREAM
00096 #endif // __DECCXX_VER
00097
00098
00099
00100 #ifdef _WIN32
00101
00102
00103 #ifdef _MSC_VER
00104
00105 #if _MSC_VER < 1300
00106 #error If you're using Visual C++, you'll need at least version 7 (VC.NET)
00107 #elif _MSC_VER < 1310
00108
00109 #undef PQXX_HAVE_REVERSE_ITERATOR
00110 #define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
00111 #define PQXX_TYPENAME
00112 #endif // _MSC_VER < 1310
00113
00114 #pragma warning (disable: 4290)
00115 #pragma warning (disable: 4355)
00116 #pragma warning (disable: 4786)
00117 #pragma warning (disable: 4251 4275 4273)
00118 #pragma comment(lib, "libpqdll")
00119 #if !defined(PQXX_LIBEXPORT) && !defined(_LIB)
00120 #define PQXX_LIBEXPORT __declspec(dllimport)
00121 #endif // PQXX_LIBEXPORT _LIB
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134 #if defined(min) || defined(max)
00135 #error "Oops: min() and/or max() are defined as preprocessor macros.\
00136 Define NOMINMAX macro before including any system headers!"
00137 #endif
00138 #define NOMINMAX
00139
00141
00153 #define PQXX_QUIET_DESTRUCTORS
00154
00155 #endif // _MSC_VER
00156 #endif // _WIN32
00157
00158
00159 #ifndef PQXX_LIBEXPORT
00160 #define PQXX_LIBEXPORT
00161 #endif
00162
00163
00164 #ifndef PQXX_TYPENAME
00165 #define PQXX_TYPENAME typename
00166 #endif
00167
00168 #endif
00169