00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef PQXX_H_COMPILER_PUBLIC
00018 #define PQXX_H_COMPILER_PUBLIC
00019
00020 #ifdef PQXX_HAVE_BOOST_SMART_PTR
00021 #include <boost/smart_ptr.hpp>
00022 #endif
00023
00024 #ifdef _MSC_VER
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #if defined(min) || defined(max)
00037 #error "Oops: min() and/or max() are defined as preprocessor macros.\
00038 Define NOMINMAX macro before including any system headers!"
00039 #endif
00040
00041 #ifndef NOMINMAX
00042 #define NOMINMAX
00043 #endif
00044
00045
00046 #define PQXX_NOVTABLE __declspec(novtable)
00047
00048 #endif // _MSC_VER
00049
00050
00051
00052 #include "pqxx/config-public-compiler.h"
00053
00054
00055 #ifdef PQXX_BROKEN_ITERATOR
00056 #include <cstddef>
00057 #include <cstdlib>
00059
00067 namespace PGSTD
00068 {
00070 template<typename Cat,
00071 typename T,
00072 typename Dist,
00073 typename Ptr=T*,
00074 typename Ref=T&> struct iterator
00075 {
00076 typedef Cat iterator_category;
00077 typedef T value_type;
00078 typedef Dist difference_type;
00079 typedef Ptr pointer;
00080 typedef Ref reference;
00081 };
00082 }
00083 #else
00084 #include <iterator>
00085 #endif // PQXX_BROKEN_ITERATOR
00086
00087 #ifndef PQXX_HAVE_CHAR_TRAITS
00088 #include <cstddef>
00089 namespace PGSTD
00090 {
00092 template<typename CHAR> struct char_traits {};
00094 template<> struct char_traits<char>
00095 {
00096 typedef int int_type;
00097 typedef size_t pos_type;
00098 typedef long off_type;
00099 typedef char char_type;
00100
00101 static int_type eof() { return -1; }
00102 };
00104 template<> struct char_traits<unsigned char>
00105 {
00106 typedef int int_type;
00107 typedef size_t pos_type;
00108 typedef long off_type;
00109 typedef unsigned char char_type;
00110
00111 static int_type eof() { return -1; }
00112 };
00113 }
00114 #endif
00115
00116
00117 #if defined(__SUNPRO_CC)
00118 #if __SUNPRO_CC_COMPAT < 5
00119 #error "This compiler version is not capable of building libpqxx."
00120 #endif // __SUNPRO_CC_COMPAT < 5
00121 #define PQXX_PRIVATE __hidden
00122 #endif // __SUNPRO_CC
00123
00124
00125
00126 #if defined(__DECCXX_VER)
00127 #define __USE_STD_IOSTREAM
00128 #endif // __DECCXX_VER
00129
00130 #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_DEPRECATED)
00131 #define PQXX_DEPRECATED __attribute__ ((deprecated))
00132 #else
00133 #define PQXX_DEPRECATED
00134 #endif
00135
00136
00137 #ifdef _WIN32
00138
00139
00140
00141
00142
00143
00144
00145 #if !defined(PQXX_LIBEXPORT) && defined(PQXX_SHARED)
00146 #define PQXX_LIBEXPORT __declspec(dllimport)
00147 #endif // !PQXX_LIBEXPORT && PQXX_SHARED
00148
00149
00150
00151 #ifdef _MSC_VER
00152
00153 #if _MSC_VER < 1300
00154 #error If you're using Visual C++, you'll need at least version 7 (.NET)
00155 #elif _MSC_VER < 1310
00156
00157 #undef PQXX_HAVE_REVERSE_ITERATOR
00158 #define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
00159 #define PQXX_TYPENAME
00160 #endif // _MSC_VER < 1310
00161
00162
00163
00164
00165
00166 #if defined(PQXX_AUTOLINK)
00167 #if defined(PQXX_PQ_STATIC)
00168 #ifdef _DEBUG
00169 #pragma comment(lib, "libpqd")
00170 #else
00171 #pragma comment(lib, "libpq")
00172 #endif
00173 #else
00174 #ifdef _DEBUG
00175 #pragma comment(lib, "libpqddll")
00176 #else
00177 #pragma comment(lib, "libpqdll")
00178 #endif
00179 #endif
00180 #endif
00181
00182
00183
00184
00185
00186
00187
00188
00189 #if defined(PQXX_AUTOLINK) && !defined(PQXX_INTERNAL)
00190 #ifdef PQXX_SHARED
00191 #ifdef _DEBUG
00192 #pragma comment(lib, "libpqxxD")
00193 #else
00194 #pragma comment(lib, "libpqxx")
00195 #endif
00196 #else // !PQXX_SHARED
00197 #ifdef _DEBUG
00198 #pragma comment(lib, "libpqxx_staticD")
00199 #else
00200 #pragma comment(lib, "libpqxx_static")
00201 #endif
00202 #endif
00203 #endif
00204
00206
00218 #define PQXX_QUIET_DESTRUCTORS
00219
00220 #endif // _MSC_VER
00221 #endif // _WIN32
00222
00223 #ifndef PQXX_LIBEXPORT
00224 #define PQXX_LIBEXPORT
00225 #endif
00226
00227 #ifndef PQXX_PRIVATE
00228 #define PQXX_PRIVATE
00229 #endif
00230
00231
00232 #ifndef PQXX_TYPENAME
00233 #define PQXX_TYPENAME typename
00234 #endif
00235
00236 #ifndef PQXX_NOVTABLE
00237 #define PQXX_NOVTABLE
00238 #endif
00239
00240 #endif
00241