00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef PQXX_COMPILER_H
00018 #define PQXX_COMPILER_H
00019
00020 #include "pqxx/config.h"
00021
00022 #ifdef BROKEN_ITERATOR
00023 namespace PGSTD
00024 {
00026 template<typename Cat,
00027 typename T,
00028 typename Dist,
00029 typename Ptr=T*,
00030 typename Ref=T&> struct iterator
00031 {
00032 typedef Cat iterator_category;
00033 typedef T value_type;
00034 typedef Dist difference_type;
00035 typedef Ptr pointer;
00036 typedef Ref reference;
00037 };
00038 }
00039 #else
00040 #include <iterator>
00041 #endif // BROKEN_ITERATOR
00042
00043 #ifndef HAVE_CHAR_TRAITS
00044 namespace PGSTD
00045 {
00047 template<typename CHAR> struct char_traits {};
00049 template<> struct char_traits<char>
00050 {
00051 typedef int int_type;
00052 typedef size_t pos_type;
00053 typedef ptrdiff_t off_type;
00054
00055 static int_type eof() { return -1; }
00056 };
00057 }
00058 #endif
00059
00060
00061 #ifdef HAVE_LIMITS
00062 #include <limits>
00063 #else // HAVE_LIMITS
00064 #include <climits>
00065 namespace PGSTD
00066 {
00068 template<typename T> struct numeric_limits
00069 {
00070 static T max() throw ();
00071 static T min() throw ();
00072 };
00073
00075 template<> inline long numeric_limits<long>::max() throw () {return LONG_MAX;}
00077 template<> inline long numeric_limits<long>::min() throw () {return LONG_MIN;}
00078 }
00079 #endif // HAVE_LIMITS
00080
00081
00082 #ifndef HAVE_ABS_LONG
00083
00084 long abs(long n) { return (n >= 0) ? n : -n; }
00085 #endif // HAVE_ABS_LONG
00086
00087
00088 #ifndef PQXX_LIBEXPORT
00089 #define PQXX_LIBEXPORT
00090 #endif
00091
00092 #endif
00093