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/libconfig.h"
00022
00023
00024 #ifndef PQXX_HAVE_PTRDIFF_T
00025 typedef long ptrdiff_t;
00026 #endif
00027
00028
00029 #ifdef PQXX_BROKEN_ITERATOR
00030 #include <cstddef>
00031 #include <cstdlib>
00032 namespace PGSTD
00033 {
00035 template<typename Cat,
00036 typename T,
00037 typename Dist,
00038 typename Ptr=T*,
00039 typename Ref=T&> struct iterator
00040 {
00041 typedef Cat iterator_category;
00042 typedef T value_type;
00043 typedef Dist difference_type;
00044 typedef Ptr pointer;
00045 typedef Ref reference;
00046 };
00047 }
00048 #else
00049 #include <iterator>
00050 #endif // PQXX_BROKEN_ITERATOR
00051
00052 #ifndef PQXX_HAVE_CHAR_TRAITS
00053 #include <cstddef>
00054 namespace PGSTD
00055 {
00057 template<typename CHAR> struct char_traits {};
00059 template<> struct char_traits<char>
00060 {
00061 typedef int int_type;
00062 typedef size_t pos_type;
00063 typedef ptrdiff_t off_type;
00064 typedef char char_type;
00065
00066 static int_type eof() { return -1; }
00067 };
00069 template<> struct char_traits<unsigned char>
00070 {
00071 typedef int int_type;
00072 typedef size_t pos_type;
00073 typedef ptrdiff_t off_type;
00074 typedef unsigned char char_type;
00075
00076 static int_type eof() { return -1; }
00077 };
00078 }
00079 #endif
00080
00081
00082 #ifdef _WIN32
00083
00084 #ifdef _MSC_VER
00085 #if _MSC_VER < 1300
00086 #error If you're using Visual C++, you'll need at least version 7 (VC.NET)
00087 #endif // _MSC_VER < 1300
00088
00089
00090 #if _MSC_VER < 1310
00091 #define PQXX_WORKAROUND_VC7
00092 #define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
00093 #define PQXX_TYPENAME
00094 #endif // _MSC_VER < 1310
00095 #pragma warning (disable: 4290)
00096 #pragma warning (disable: 4786)
00097 #pragma warning (disable: 4251 4275 4273)
00098 #pragma comment(lib, "libpqdll")
00099 #if !defined(PQXX_LIBEXPORT) && !defined(_LIB)
00100 #define PQXX_LIBEXPORT __declspec(dllimport)
00101 #endif // PQXX_LIBEXPORT _LIB
00102 #endif // _MSC_VER
00103 #endif // _WIN32
00104
00105
00106 #ifndef PQXX_LIBEXPORT
00107 #define PQXX_LIBEXPORT
00108 #endif
00109
00110
00111 #ifndef PQXX_TYPENAME
00112 #define PQXX_TYPENAME typename
00113 #endif
00114
00115 #endif
00116