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