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 #ifdef _MSC_VER
00126
00127 #if _MSC_VER < 1300
00128 #error If you're using Visual C++, you'll need at least version 7 (VC.NET)
00129 #elif _MSC_VER < 1310
00130
00131 #undef PQXX_HAVE_REVERSE_ITERATOR
00132 #define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
00133 #define PQXX_TYPENAME
00134 #endif // _MSC_VER < 1310
00135
00136 #pragma warning (disable: 4290)
00137 #pragma warning (disable: 4355)
00138 #pragma warning (disable: 4786)
00139 #pragma warning (disable: 4251 4275 4273)
00140 #pragma comment(lib, "libpqdll")
00141 #if !defined(PQXX_LIBEXPORT) && !defined(_LIB)
00142 #define PQXX_LIBEXPORT __declspec(dllimport)
00143 #endif // PQXX_LIBEXPORT _LIB
00144
00146
00158 #define PQXX_QUIET_DESTRUCTORS
00159
00160 #endif // _MSC_VER
00161 #endif // _WIN32
00162
00163
00164 #ifndef PQXX_LIBEXPORT
00165 #define PQXX_LIBEXPORT
00166 #endif
00167
00168
00169 #ifndef PQXX_TYPENAME
00170 #define PQXX_TYPENAME typename
00171 #endif
00172
00173 #endif
00174