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