$OpenBSD: patch-sqlplusint_type_info1_hh,v 1.2 2004/12/14 17:40:44 espie Exp $
--- sqlplusint/type_info1.hh.orig	Sat May 19 18:44:48 2001
+++ sqlplusint/type_info1.hh	Tue Dec 14 18:38:33 2004
@@ -11,49 +11,45 @@
 #include <typeinfo>
 #include <map>
 
-#ifdef __USLC__
-using namespace std;
-#endif
-
 class mysql_type_info;
 class mysql_ti_sql_type_info_lookup;
 
 class mysql_ti_sql_type_info {
-  friend mysql_type_info;
-  friend mysql_ti_sql_type_info_lookup;
+  friend class mysql_type_info;
+  friend class mysql_ti_sql_type_info_lookup;
 private:
   const char          *_sql_name;
-  const type_info     *_c_type;
+  const std::type_info *_c_type;
   const unsigned char  _base_type;
   const bool           _default;
-  mysql_ti_sql_type_info (const mysql_ti_sql_type_info &b);           // can't do
+  // mysql_ti_sql_type_info (const mysql_ti_sql_type_info &b);           // can't do
   mysql_ti_sql_type_info& operator=(const mysql_ti_sql_type_info &b); //  "    "
-  mysql_ti_sql_type_info () {} 
+  mysql_ti_sql_type_info () : _base_type(0), _default(false) {} 
   // OEP - didn't init _base_type and _default mysql_ti_sql_type_info () {} 
   // all private, only mysql_type_info can
   // create because there *must* be only one copy
   // of each.
-  mysql_ti_sql_type_info (const char *s, const type_info &t, 
+  mysql_ti_sql_type_info (const char *s, const std::type_info &t, 
 			  const unsigned char bt = 0,  const bool d = false )
     : _sql_name(s), _c_type(&t), _base_type(bt), _default(d) {}
 };
 
 struct type_info_cmp {
-  bool operator() (const type_info *lhs, const type_info *rhs) const {
+  bool operator() (const std::type_info *lhs, const std::type_info *rhs) const {
     return lhs->before(*rhs);
   }
 };
 
 class mysql_ti_sql_type_info_lookup {
-  friend mysql_type_info;
+  friend class mysql_type_info;
 private:
   typedef mysql_ti_sql_type_info sql_type_info;
 
-  map<const type_info *, unsigned char, type_info_cmp> _map;
+  std::map<const std::type_info *, unsigned char, type_info_cmp> _map;
   
   mysql_ti_sql_type_info_lookup(const sql_type_info types[], const int size);
 
-  const unsigned char& operator [] (const type_info &ti) const {
+  const unsigned char& operator [] (const std::type_info &ti) const {
     return _map.find(&ti)->second;
   }
 };
@@ -94,14 +90,14 @@ public:
   //:
   mysql_type_info(const mysql_type_info &t) : num(t.num) {}
   //:
-  mysql_type_info(const type_info &t) {num = lookups[t]; }
+  mysql_type_info(const std::type_info &t) {num = lookups[t]; }
   //: 
   mysql_type_info& operator = (unsigned char n) {num=n; return *this;}
   //:
   mysql_type_info& operator = (const mysql_type_info &t) 
     {num = t.num; return *this;}
   //:
-  mysql_type_info& operator = (const type_info &t)
+  mysql_type_info& operator = (const std::type_info &t)
     {num = lookups[t]; return *this;}
   //:
   inline const char*           name()      const;
@@ -110,7 +106,7 @@ public:
   // associated with the sql type.
   inline const char*           sql_name()  const;
   //: Returns the name for the sql type.
-  inline const type_info&      c_type()    const;
+  inline const std::type_info& c_type()    const;
 	inline const unsigned int length() const;
 	inline const unsigned int max_length() const;
   //: Returns the type_info for the C++ type associated with the sql type.
@@ -146,7 +142,7 @@ inline const unsigned int    mysql_type_
 inline const unsigned int    mysql_type_info::max_length()  const {
   return _max_length;
 }
-inline const type_info&      mysql_type_info::c_type()    const {
+inline const std::type_info& mysql_type_info::c_type()    const {
   return *deref()._c_type;
 }
 inline const mysql_type_info mysql_type_info::base_type() const 
@@ -172,19 +168,19 @@ inline bool operator != (const mysql_typ
   return a.id() != b.id();
 }
 
-inline bool operator == (const type_info &a, const mysql_type_info &b) {
+inline bool operator == (const std::type_info &a, const mysql_type_info &b) {
   return a == b.c_type();
 }
 
-inline bool operator != (const type_info &a, const mysql_type_info &b) {
+inline bool operator != (const std::type_info &a, const mysql_type_info &b) {
   return a != b.c_type();
 }
 
-inline bool operator == (const mysql_type_info &a, const type_info &b) {
+inline bool operator == (const mysql_type_info &a, const std::type_info &b) {
   return a.c_type() == b;
 }
 
-inline bool operator != (const mysql_type_info &a, const type_info &b) {
+inline bool operator != (const mysql_type_info &a, const std::type_info &b) {
   return a.c_type() != b;
 }
 
