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/config-public-compiler.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>
00033 
00041 
namespace PGSTD
00042 {
00044 
template<
typename Cat, 
00045          
typename T, 
00046          
typename Dist, 
00047          
typename Ptr=T*,
00048          
typename Ref=T&> 
struct iterator
00049 {
00050   
typedef Cat iterator_category;
00051   
typedef T value_type;
00052   
typedef Dist difference_type;
00053   
typedef Ptr pointer;
00054   
typedef Ref reference;
00055 };
00056 }
00057 
#else
00058 
#include <iterator>
00059 
#endif // PQXX_BROKEN_ITERATOR
00060 
00061 
#ifndef PQXX_HAVE_CHAR_TRAITS
00062 
#include <cstddef>
00063 
namespace PGSTD
00064 {
00066 template<
typename CHAR> 
struct char_traits {};
00068 template<> 
struct char_traits<char>
00069 {
00070   typedef int int_type;
00071   typedef size_t 
pos_type;
00072   typedef ptrdiff_t off_type;
00073   typedef char char_type;
00074 
00075   static int_type eof() { 
return -1; }
00076 };
00078 template<> 
struct char_traits<unsigned char>
00079 {
00080   typedef int int_type;
00081   typedef size_t 
pos_type;
00082   typedef ptrdiff_t off_type;
00083   typedef unsigned char char_type;
00084 
00085   static int_type eof() { 
return -1; }
00086 };
00087 }
00088 
#endif
00089 
00090 
00091 
#if defined(__SUNPRO_CC)
00092 
#if __SUNPRO_CC_COMPAT < 5
00093 
#error "This compiler version is not capable of building libpqxx."
00094 
#endif  // __SUNPRO_CC_COMPAT < 5
00095 
00096 
#define PQXX_BROKEN_MEMBER_TEMPLATE_DEFAULT_ARG
00097 
00098 
#endif  // __SUNPRO_CC
00099 
00100 
00101 
00102 
#if defined(__DECCXX_VER)
00103 
#define __USE_STD_IOSTREAM
00104 
#endif  // __DECCXX_VER
00105 
00106 
00107 
00108 
#ifdef _WIN32
00109 
00110 
00111 
#ifdef _MSC_VER
00112 
#if _MSC_VER < 1300
00113 
#error If you're using Visual C++, you'll need at least version 7 (VC.NET)
00114 
#endif  // _MSC_VER < 1300
00115 
00116 
00117 
#if _MSC_VER < 1310
00118 
#define PQXX_WORKAROUND_VC7
00119 
#undef PQXX_HAVE_REVERSE_ITERATOR
00120 
#define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
00121 
#define PQXX_TYPENAME
00122 
#endif  // _MSC_VER < 1310
00123 
#pragma warning (disable: 4290)
00124 
#pragma warning (disable: 4355)
00125 
#pragma warning (disable: 4786)
00126 
#pragma warning (disable: 4251 4275 4273)
00127 
#pragma comment(lib, "libpqdll")
00128 
#if !defined(PQXX_LIBEXPORT) && !defined(_LIB)
00129 
#define PQXX_LIBEXPORT __declspec(dllimport)
00130 
#endif  // PQXX_LIBEXPORT _LIB
00131 
#endif  // _MSC_VER
00132 
#endif  // _WIN32
00133 
00134 
00135 
#ifndef PQXX_LIBEXPORT
00136 
#define PQXX_LIBEXPORT
00137 
#endif
00138 
00139 
00140 
#ifndef PQXX_TYPENAME
00141 #define PQXX_TYPENAME typename
00142 
#endif
00143 
00144 
#endif
00145