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 #ifdef _MSC_VER
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #if defined(min) || defined(max)
00033 #error "Oops: min() and/or max() are defined as preprocessor macros.\
00034 Define NOMINMAX macro before including any system headers!"
00035 #endif
00036
00037 #ifndef NOMINMAX
00038 #define NOMINMAX
00039 #endif
00040
00041 #endif
00042
00043
00044
00045 #include "pqxx/config-public-compiler.h"
00046
00047
00048 #ifdef PQXX_BROKEN_ITERATOR
00049 #include <cstddef>
00050 #include <cstdlib>
00052
00060 namespace PGSTD
00061 {
00063 template<typename Cat,
00064 typename T,
00065 typename Dist,
00066 typename Ptr=T*,
00067 typename Ref=T&> struct iterator
00068 {
00069 typedef Cat iterator_category;
00070 typedef T value_type;
00071 typedef Dist difference_type;
00072 typedef Ptr pointer;
00073 typedef Ref reference;
00074 };
00075 }
00076 #else
00077 #include <iterator>
00078 #endif // PQXX_BROKEN_ITERATOR
00079
00080 #ifndef PQXX_HAVE_CHAR_TRAITS
00081 #include <cstddef>
00082 namespace PGSTD
00083 {
00085 template<typename CHAR> struct char_traits {};
00087 template<> struct char_traits<char>
00088 {
00089 typedef int int_type;
00090 typedef size_t pos_type;
00091 typedef long off_type;
00092 typedef char char_type;
00093
00094 static int_type eof() { return -1; }
00095 };
00097 template<> struct char_traits<unsigned char>
00098 {
00099 typedef int int_type;
00100 typedef size_t pos_type;
00101 typedef long off_type;
00102 typedef unsigned char char_type;
00103
00104 static int_type eof() { return -1; }
00105 };
00106 }
00107 #endif
00108
00109
00110 #if defined(__SUNPRO_CC)
00111 #if __SUNPRO_CC_COMPAT < 5
00112 #error "This compiler version is not capable of building libpqxx."
00113 #endif // __SUNPRO_CC_COMPAT < 5
00114 #endif // __SUNPRO_CC
00115
00116
00117
00118 #if defined(__DECCXX_VER)
00119 #define __USE_STD_IOSTREAM
00120 #endif // __DECCXX_VER
00121
00122
00123
00124 #ifdef _WIN32
00125
00126
00127
00128
00129
00130
00131
00132 #if !defined(PQXX_LIBEXPORT) && defined(PQXX_SHARED)
00133 #define PQXX_LIBEXPORT __declspec(dllimport)
00134 #endif // !PQXX_LIBEXPORT && PQXX_SHARED
00135
00136
00137
00138 #ifdef _MSC_VER
00139
00140 #if _MSC_VER < 1300
00141 #error If you're using Visual C++, you'll need at least version 7 (VC.NET)
00142 #elif _MSC_VER < 1310
00143
00144 #undef PQXX_HAVE_REVERSE_ITERATOR
00145 #define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
00146 #define PQXX_TYPENAME
00147 #endif // _MSC_VER < 1310
00148
00149 #pragma warning (disable: 4290)
00150 #pragma warning (disable: 4355)
00151 #pragma warning (disable: 4786)
00152 #pragma warning (disable: 4251 4275 4273)
00153 #pragma comment(lib, "libpqdll")
00154
00156
00168 #define PQXX_QUIET_DESTRUCTORS
00169
00170 #endif // _MSC_VER
00171 #endif // _WIN32
00172
00173 #ifndef PQXX_LIBEXPORT
00174 #define PQXX_LIBEXPORT
00175 #endif
00176
00177 #ifndef PQXX_PRIVATE
00178 #define PQXX_PRIVATE
00179 #endif
00180
00181
00182 #ifndef PQXX_TYPENAME
00183 #define PQXX_TYPENAME typename
00184 #endif
00185
00186 #endif
00187