00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef PQXX_COMPILER_H
00019 #define PQXX_COMPILER_H
00020
00021
00022 #include "pqxx/config.h"
00023 #include "pqxx/libcompiler.h"
00024
00025
00026 #ifdef HAVE_LIMITS
00027 #include <limits>
00028 #else // HAVE_LIMITS
00029 #include <climits>
00030 namespace PGSTD
00031 {
00033 template<typename T> struct numeric_limits
00034 {
00035 static T max() throw ();
00036 static T min() throw ();
00037 };
00038
00040 template<> inline long numeric_limits<long>::max() throw () {return LONG_MAX;}
00042 template<> inline long numeric_limits<long>::min() throw () {return LONG_MIN;}
00043 }
00044 #endif // HAVE_LIMITS
00045
00046
00047 #ifndef HAVE_ABS_LONG
00048
00049 long abs(long n) { return (n >= 0) ? n : -n; }
00050 #endif // HAVE_ABS_LONG
00051
00052 #ifdef _WIN32
00053 #ifdef LIBPQXXDLL_EXPORTS
00054 #undef PQXX_LIBEXPORT
00055 #define PQXX_LIBEXPORT __declspec(dllexport)
00056 #endif // LIBPQXXDLL_EXPORTS
00057 #endif // _WIN32
00058
00059 #endif
00060