diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2003-05-08 20:32:00 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2003-05-08 20:32:00 +0000 |
commit | 360de2b52e39aa09e38f422bdf26c982eb65a73f (patch) | |
tree | e0a4d68748e0009a1542f4b32242d426454fd4c4 /dev-db/mysql++ | |
parent | Lots of fixes for bugs (diff) | |
download | historical-360de2b52e39aa09e38f422bdf26c982eb65a73f.tar.gz historical-360de2b52e39aa09e38f422bdf26c982eb65a73f.tar.bz2 historical-360de2b52e39aa09e38f422bdf26c982eb65a73f.zip |
Lots of fixes for bugs
Diffstat (limited to 'dev-db/mysql++')
-rw-r--r-- | dev-db/mysql++/Manifest | 12 | ||||
-rw-r--r-- | dev-db/mysql++/files/digest-mysql++-1.7.9 | 2 | ||||
-rw-r--r-- | dev-db/mysql++/files/digest-mysql++-1.7.9-r1 | 2 | ||||
-rw-r--r-- | dev-db/mysql++/files/mysql++-1.7.9-gcc_throw.patch | 204 | ||||
-rw-r--r-- | dev-db/mysql++/files/mysql++-1.7.9-mysql4-gcc295.patch | 12 | ||||
-rw-r--r-- | dev-db/mysql++/files/mysql++-1.7.9-mysql4-gcc3.patch | 12 | ||||
-rw-r--r-- | dev-db/mysql++/files/mysql++-gcc-3.2.patch | 360 | ||||
-rw-r--r-- | dev-db/mysql++/mysql++-1.7.9-r1.ebuild | 72 |
8 files changed, 309 insertions, 367 deletions
diff --git a/dev-db/mysql++/Manifest b/dev-db/mysql++/Manifest index c41f231376d1..f3a40d958954 100644 --- a/dev-db/mysql++/Manifest +++ b/dev-db/mysql++/Manifest @@ -1,9 +1,9 @@ -MD5 77f606bb31edeabfefa2d556d2f7cb5f mysql++-1.7.9.ebuild 1552 -MD5 336ee1df03c7ddce2999a37cf672a3ca mysql++-1.7.9-r1.ebuild 1626 -MD5 1f6159553641a9895cdd0e34b509115a mysql++-1.7.9-r1.ebuild~ 1578 -MD5 e670074a93c9d8bd9695be8f5ffb927b ChangeLog 683 +MD5 fbdfacb7177f528d0e9f268d06c5b5c2 mysql++-1.7.9.ebuild 1518 +MD5 86e5fe459c13b02a722005b7b14c3b97 mysql++-1.7.9-r1.ebuild 2599 +MD5 4b04913f76f0a41befbab7d1ca6b1314 ChangeLog 1380 MD5 29dd283bdc19e7542a9f50501d4eda70 files/mysql++-1.7.9_example.patch 1203 -MD5 f4467c7ece50c1e366a80887cc2618b1 files/mysql++-gcc-3.2.patch 12811 -MD5 df8b63fa4e50d26e09bf233fd22e537f files/mysql++-1.7.9-mysql4-compilecleanup.patch 5884 +MD5 027947f703cc541c6b056955cf5606be files/mysql++-1.7.9-gcc_throw.patch 7310 +MD5 54b8d3ba432ce4cad6c23fa32ac17042 files/mysql++-1.7.9-mysql4-gcc295.patch 421 MD5 7a4351e2de9702b6fd505ea61e4eb899 files/digest-mysql++-1.7.9 133 +MD5 229dd0f10e6cee31e2f93df59b5f6742 files/mysql++-1.7.9-mysql4-gcc3.patch 426 MD5 7a4351e2de9702b6fd505ea61e4eb899 files/digest-mysql++-1.7.9-r1 133 diff --git a/dev-db/mysql++/files/digest-mysql++-1.7.9 b/dev-db/mysql++/files/digest-mysql++-1.7.9 index fff7d0239001..1a2a98d09837 100644 --- a/dev-db/mysql++/files/digest-mysql++-1.7.9 +++ b/dev-db/mysql++/files/digest-mysql++-1.7.9 @@ -1,2 +1,2 @@ MD5 1312fb4e33dcce07fac5fa9c2ac801f7 mysql++-1.7.9.tar.gz 749476 -MD5 f0fe100dd755078d9348365002889ec8 mysql++-gcc-3.0.patch.gz 21357 +MD5 118d30c7ffd7e5ad49b78415acaac0bb mysql++-gcc-3.0.patch.gz 21357 diff --git a/dev-db/mysql++/files/digest-mysql++-1.7.9-r1 b/dev-db/mysql++/files/digest-mysql++-1.7.9-r1 new file mode 100644 index 000000000000..1a2a98d09837 --- /dev/null +++ b/dev-db/mysql++/files/digest-mysql++-1.7.9-r1 @@ -0,0 +1,2 @@ +MD5 1312fb4e33dcce07fac5fa9c2ac801f7 mysql++-1.7.9.tar.gz 749476 +MD5 118d30c7ffd7e5ad49b78415acaac0bb mysql++-gcc-3.0.patch.gz 21357 diff --git a/dev-db/mysql++/files/mysql++-1.7.9-gcc_throw.patch b/dev-db/mysql++/files/mysql++-1.7.9-gcc_throw.patch new file mode 100644 index 000000000000..219b368504a4 --- /dev/null +++ b/dev-db/mysql++/files/mysql++-1.7.9-gcc_throw.patch @@ -0,0 +1,204 @@ +diff -rc mysql++-1.7.9/sqlplusint/connection1.hh mysql++-1.7.9.patched/sqlplusint/connection1.hh +*** mysql++-1.7.9/sqlplusint/connection1.hh Wed Feb 19 20:57:09 2003 +--- mysql++-1.7.9.patched/sqlplusint/connection1.hh Wed Feb 19 21:01:07 2003 +*************** +*** 11,19 **** + #include <vector.h> + #include <deque.h> + #include <list.h> +! #include <slist.h> +! #include <set.h> +! #include <map.h> + #include <multiset.h> + #include "define_short" + #include "exceptions.hh" +--- 11,19 ---- + #include <vector.h> + #include <deque.h> + #include <list.h> +! #include <ext/slist> +! #include <set> +! #include <map> + #include <multiset.h> + #include "define_short" + #include "exceptions.hh" +diff -rc mysql++-1.7.9/sqlplusint/convert1.hh mysql++-1.7.9.patched/sqlplusint/convert1.hh +*** mysql++-1.7.9/sqlplusint/convert1.hh Sat May 19 18:44:48 2001 +--- mysql++-1.7.9.patched/sqlplusint/convert1.hh Wed Feb 19 21:01:07 2003 +*************** +*** 16,22 **** + operator TYPE () {return num;}\ + };\ + +! extern double strtod (const char *, char **); + + mysql__convert(float, strtod) + mysql__convert(double, strtod) +--- 16,22 ---- + operator TYPE () {return num;}\ + };\ + +! extern double strtod (const char *, char **) throw (); + + mysql__convert(float, strtod) + mysql__convert(double, strtod) +*************** +*** 33,40 **** + operator TYPE () {return num;}\ + };\ + +! extern long strtol(const char *str, char **ptr, int base); +! extern unsigned long strtoul(const char *str, char **ptr, int base); + + mysql__convert(char, strtol) + mysql__convert(signed char, strtol) +--- 33,40 ---- + operator TYPE () {return num;}\ + };\ + +! extern long strtol(const char *str, char **ptr, int base) throw(); +! extern unsigned long strtoul(const char *str, char **ptr, int base) throw(); + + mysql__convert(char, strtol) + mysql__convert(signed char, strtol) +*************** +*** 58,65 **** + extern "C" { + extern char *longlong2str(longlong val,char *dst,int radix); + extern char *longlong10_to_str(longlong val,char *dst,int radix); +! extern longlong strtoll(const char *nptr,char **endptr,int base); +! extern ulonglong strtoull(const char *nptr,char **endptr,int base); + } + mysql__convert(longlong, strtoll) + mysql__convert(ulonglong, strtoull) +--- 58,65 ---- + extern "C" { + extern char *longlong2str(longlong val,char *dst,int radix); + extern char *longlong10_to_str(longlong val,char *dst,int radix); +! extern longlong strtoll(const char *nptr,char **endptr,int base) throw(); +! extern ulonglong strtoull(const char *nptr,char **endptr,int base) throw(); + } + mysql__convert(longlong, strtoll) + mysql__convert(ulonglong, strtoull) +diff -rc mysql++-1.7.9/sqlplusint/exceptions.hh mysql++-1.7.9.patched/sqlplusint/exceptions.hh +*** mysql++-1.7.9/sqlplusint/exceptions.hh Wed Feb 19 20:57:09 2003 +--- mysql++-1.7.9.patched/sqlplusint/exceptions.hh Wed Feb 19 21:04:50 2003 +*************** +*** 13,39 **** + //: Exception thrown when a BadQuery is encountered + class BadQuery : public exception { + public: +! BadQuery(const string &er = "") : error(er) {} +! const string error; //: The error message + virtual const char* what( void ) const { return error.c_str(); } + }; + + //: Exception structure thrown when a bad conversion takes place + class BadConversion : public exception { +! const string _what; + public: + const char* type_name; //: +! const string data; //: + size_t retrieved; //: + size_t actual_size;//: + BadConversion(const char* tn, const char* d, size_t r, size_t a) +! : _what(string("Tried to convert \"") + string(d ? d : "") + "\" to a \"" + string(tn ? tn : "")), + type_name(tn), data(d), retrieved(r), actual_size(a) {}; + +! BadConversion(const string &wt, const char* tn, const char* d, size_t r, size_t a) + : _what(wt), type_name(tn), data(d), retrieved(r), actual_size(a) {}; + +! BadConversion(const string& wt = "") + : _what(wt), type_name("unknown"), data(""), retrieved(0), actual_size(0) {}; + + virtual const char* what( void ) const { return _what.c_str(); } +--- 13,39 ---- + //: Exception thrown when a BadQuery is encountered + class BadQuery : public exception { + public: +! BadQuery(const std::string &er = "") : error(er) {} +! const std::string error; //: The error message + virtual const char* what( void ) const { return error.c_str(); } + }; + + //: Exception structure thrown when a bad conversion takes place + class BadConversion : public exception { +! const std::string _what; + public: + const char* type_name; //: +! const std::string data; //: + size_t retrieved; //: + size_t actual_size;//: + BadConversion(const char* tn, const char* d, size_t r, size_t a) +! : _what(std::string("Tried to convert \"") + std::string(d ? d : "") + "\" to a \"" + std::string(tn ? tn : "")), + type_name(tn), data(d), retrieved(r), actual_size(a) {}; + +! BadConversion(const std::string &wt, const char* tn, const char* d, size_t r, size_t a) + : _what(wt), type_name(tn), data(d), retrieved(r), actual_size(a) {}; + +! BadConversion(const std::string& wt = "") + : _what(wt), type_name("unknown"), data(""), retrieved(0), actual_size(0) {}; + + virtual const char* what( void ) const { return _what.c_str(); } +*************** +*** 42,50 **** + //: Thrown when a *Null* value is trying to be converted into a type + //: it can't convert to. + class BadNullConversion : public exception { +! const string _what; + public: +! BadNullConversion(const string &wt = "") : _what(wt) {} + virtual const char* what( void ) const { return _what.c_str(); } + }; + +--- 42,50 ---- + //: Thrown when a *Null* value is trying to be converted into a type + //: it can't convert to. + class BadNullConversion : public exception { +! const std::string _what; + public: +! BadNullConversion(const std::string &wt = "") : _what(wt) {} + virtual const char* what( void ) const { return _what.c_str(); } + }; + +*************** +*** 52,60 **** + // Thrown when not enough parameters are provided for a + // template query. + class SQLQueryNEParms : public exception { +! const string _what; + public: +! SQLQueryNEParms(const char *c) : _what(string(c ? c : "")), error(c) {} + const char* error; //: + virtual const char* what( void ) const { return _what.c_str(); } + }; +--- 52,60 ---- + // Thrown when not enough parameters are provided for a + // template query. + class SQLQueryNEParms : public exception { +! const std::string _what; + public: +! SQLQueryNEParms(const char *c) : _what(std::string(c ? c : "")), error(c) {} + const char* error; //: + virtual const char* what( void ) const { return _what.c_str(); } + }; +diff -rc mysql++-1.7.9/sqlplusint/result1.hh mysql++-1.7.9.patched/sqlplusint/result1.hh +*** mysql++-1.7.9/sqlplusint/result1.hh Wed Feb 19 20:57:09 2003 +--- mysql++-1.7.9.patched/sqlplusint/result1.hh Wed Feb 19 21:03:09 2003 +*************** +*** 149,155 **** + // yet. + // + class Result : public ResUse, +! public const_subscript_container<Result,Row,const Row> + { + friend class Connection; + public: +--- 149,155 ---- + // yet. + // + class Result : public ResUse, +! virtual public const_subscript_container<Result,Row,const Row> + { + friend class Connection; + public: diff --git a/dev-db/mysql++/files/mysql++-1.7.9-mysql4-gcc295.patch b/dev-db/mysql++/files/mysql++-1.7.9-mysql4-gcc295.patch new file mode 100644 index 000000000000..ffe449b2596b --- /dev/null +++ b/dev-db/mysql++/files/mysql++-1.7.9-mysql4-gcc295.patch @@ -0,0 +1,12 @@ +diff -ur mysql++-1.7.9-old/sqlplusint/connection.cc mysql++-1.7.9/sqlplusint/connection.cc +--- mysql++-1.7.9-old/sqlplusint/connection.cc 2003-05-08 12:20:12.000000000 -0700 ++++ mysql++-1.7.9/sqlplusint/connection.cc 2003-05-08 12:23:50.000000000 -0700 +@@ -109,7 +109,7 @@ + } + + string Connection::info () { +- char *i = mysql_info(&mysql); ++ const char *i = mysql_info(&mysql); + if (!i) + return string(); + else diff --git a/dev-db/mysql++/files/mysql++-1.7.9-mysql4-gcc3.patch b/dev-db/mysql++/files/mysql++-1.7.9-mysql4-gcc3.patch new file mode 100644 index 000000000000..b0d02962ed2f --- /dev/null +++ b/dev-db/mysql++/files/mysql++-1.7.9-mysql4-gcc3.patch @@ -0,0 +1,12 @@ +diff -ur mysql++-1.7.9-old/sqlplusint/connection.cc mysql++-1.7.9/sqlplusint/connection.cc +--- mysql++-1.7.9-old/sqlplusint/connection.cc 2003-05-08 12:20:12.000000000 -0700 ++++ mysql++-1.7.9/sqlplusint/connection.cc 2003-05-08 12:23:50.000000000 -0700 +@@ -109,7 +109,7 @@ + } + + std::string Connection::info () { +- char *i = mysql_info(&mysql); ++ const char *i = mysql_info(&mysql); + if (!i) + return string(); + else diff --git a/dev-db/mysql++/files/mysql++-gcc-3.2.patch b/dev-db/mysql++/files/mysql++-gcc-3.2.patch deleted file mode 100644 index ec21d2f3a731..000000000000 --- a/dev-db/mysql++/files/mysql++-gcc-3.2.patch +++ /dev/null @@ -1,360 +0,0 @@ -diff -rc mysql++-1.7.9-gcc3.0/configure.in mysql++-1.7.9-gcc3.2/configure.in -*** mysql++-1.7.9-gcc3.0/configure.in 2001-05-19 18:44:46.000000000 +0200 ---- mysql++-1.7.9-gcc3.2/configure.in 2002-10-13 22:58:08.000000000 +0200 -*************** -*** 14,20 **** - - AC_PROG_MAKE_SET - -! AM_PROG_LIBTOOL - - dnl Initialize maintainer mode - AM_MAINTAINER_MODE ---- 14,20 ---- - - AC_PROG_MAKE_SET - -! AC_PROG_LIBTOOL - - dnl Initialize maintainer mode - AM_MAINTAINER_MODE -diff -rc mysql++-1.7.9-gcc3.0/sqlplusint/coldata1.hh mysql++-1.7.9-gcc3.2/sqlplusint/coldata1.hh -*** mysql++-1.7.9-gcc3.0/sqlplusint/coldata1.hh 2002-10-14 13:15:41.000000000 +0200 ---- mysql++-1.7.9-gcc3.2/sqlplusint/coldata1.hh 2002-10-17 12:11:15.000000000 +0200 -*************** -*** 43,51 **** - std::string buf; - bool _null; - public: -! mysql_ColData (bool n, mysql_type_info t = mysql_type_info::string_type) - : _type(t), _null(n) {} -! mysql_ColData (const char *str, - mysql_type_info t = mysql_type_info::string_type, bool n = false) - : Str(str), _type(t), _null(n) {buf=str;} - mysql_ColData () {} ---- 43,51 ---- - std::string buf; - bool _null; - public: -! explicit mysql_ColData (bool n, mysql_type_info t = mysql_type_info::string_type) - : _type(t), _null(n) {} -! explicit mysql_ColData (const char *str, - mysql_type_info t = mysql_type_info::string_type, bool n = false) - : Str(str), _type(t), _null(n) {buf=str;} - mysql_ColData () {} -Nur in mysql++-1.7.9-gcc3.2/sqlplusint: coldata1.hh~. -diff -rc mysql++-1.7.9-gcc3.0/sqlplusint/compare1.hh mysql++-1.7.9-gcc3.2/sqlplusint/compare1.hh -*** mysql++-1.7.9-gcc3.0/sqlplusint/compare1.hh 2002-10-14 13:15:41.000000000 +0200 ---- mysql++-1.7.9-gcc3.2/sqlplusint/compare1.hh 2002-10-17 12:32:37.000000000 +0200 -*************** -*** 1,12 **** - #ifndef __compare1_hh__ - #define __compare1_hh__ - -! #include <function.h> - #include <cstring> - #include "row1.hh" - - template <class BinaryPred, class CmpType> -! class MysqlCmp : public unary_function<const MysqlRow&, bool> - { - protected: - unsigned int index; ---- 1,12 ---- - #ifndef __compare1_hh__ - #define __compare1_hh__ - -! #include <functional> - #include <cstring> - #include "row1.hh" - - template <class BinaryPred, class CmpType> -! class MysqlCmp : public std::unary_function<const MysqlRow&, bool> - { - protected: - unsigned int index; -*************** -*** 37,43 **** - return MysqlCmp<BinaryPred, CmpType>(i, func, cmp2); - } - -! typedef binary_function<const char*, const char*, bool> bin_char_pred; - - struct cstr_equal_to : bin_char_pred { - bool operator () (const char *x, const char *y) const ---- 37,43 ---- - return MysqlCmp<BinaryPred, CmpType>(i, func, cmp2); - } - -! typedef std::binary_function<const char*, const char*, bool> bin_char_pred; - - struct cstr_equal_to : bin_char_pred { - bool operator () (const char *x, const char *y) const -Nur in mysql++-1.7.9-gcc3.2/sqlplusint: compare1.hh~. -diff -rc mysql++-1.7.9-gcc3.0/sqlplusint/connection.cc mysql++-1.7.9-gcc3.2/sqlplusint/connection.cc -*** mysql++-1.7.9-gcc3.0/sqlplusint/connection.cc 2002-10-14 13:15:41.000000000 +0200 ---- mysql++-1.7.9-gcc3.2/sqlplusint/connection.cc 2002-10-13 23:01:00.000000000 +0200 -*************** -*** 20,28 **** - } - - Connection::Connection (const char *db, const char *host, const char *user, -! const char *passwd, uint port, my_bool compress = 0, -! unsigned int connect_timeout = 60, bool te = true, -! const char *socket_name = "", unsigned client_flag = 0) - : throw_exceptions(te), locked(false) - { - mysql_init(&mysql); ---- 20,28 ---- - } - - Connection::Connection (const char *db, const char *host, const char *user, -! const char *passwd, uint port, my_bool compress, -! unsigned int connect_timeout, bool te, -! const char *socket_name, unsigned client_flag) - : throw_exceptions(te), locked(false) - { - mysql_init(&mysql); -*************** -*** 39,47 **** - } - - bool Connection::real_connect (cchar *db, cchar *host, cchar *user, -! cchar *passwd, uint port, my_bool compress = 0, -! unsigned int connect_timeout = 60, -! const char *socket_name = "", unsigned int client_flag = 0) - { - mysql.options.compress = compress; - mysql.options.connect_timeout=connect_timeout; ---- 39,47 ---- - } - - bool Connection::real_connect (cchar *db, cchar *host, cchar *user, -! cchar *passwd, uint port, my_bool compress, -! unsigned int connect_timeout, -! const char *socket_name, unsigned int client_flag) - { - mysql.options.compress = compress; - mysql.options.connect_timeout=connect_timeout; -diff -rc mysql++-1.7.9-gcc3.0/sqlplusint/exceptions.hh.in mysql++-1.7.9-gcc3.2/sqlplusint/exceptions.hh.in -*** mysql++-1.7.9-gcc3.0/sqlplusint/exceptions.hh.in 2002-10-14 13:15:41.000000000 +0200 ---- mysql++-1.7.9-gcc3.2/sqlplusint/exceptions.hh.in 2002-10-17 00:11:47.000000000 +0200 -*************** -*** 10,61 **** - // with --enable-exception flag. - - //: Exception thrown when a BadQuery is encountered -! class BadQuery : public exception { - public: -! BadQuery(const string &er = "") : error(er) {} -! const string error; //: The error message -! virtual const char* what( void ) const { return error.c_str(); } - }; - - //: Exception structure thrown when a bad conversion takes place -! class BadConversion : public exception { -! const string _what; - public: - const char* type_name; //: -! const string data; //: - size_t retrieved; //: - size_t actual_size;//: - BadConversion(const char* tn, const char* d, size_t r, size_t a) -! : _what(string("Tried to convert \"") + string(d ? d : "") + "\" to a \"" + string(tn ? tn : "")), - type_name(tn), data(d), retrieved(r), actual_size(a) {}; - -! BadConversion(const string &wt, const char* tn, const char* d, size_t r, size_t a) - : _what(wt), type_name(tn), data(d), retrieved(r), actual_size(a) {}; - -! BadConversion(const string& wt = "") - : _what(wt), type_name("unknown"), data(""), retrieved(0), actual_size(0) {}; - -! virtual const char* what( void ) const { return _what.c_str(); } - }; - - //: Thrown when a *Null* value is trying to be converted into a type - //: it can't convert to. -! class BadNullConversion : public exception { -! const string _what; - public: -! BadNullConversion(const string &wt = "") : _what(wt) {} -! virtual const char* what( void ) const { return _what.c_str(); } - }; - - //: Exception thrown when not enough parameters are provided - // Thrown when not enough parameters are provided for a - // template query. -! class SQLQueryNEParms : public exception { -! const string _what; - public: -! SQLQueryNEParms(const char *c) : _what(string(c ? c : "")), error(c) {} - const char* error; //: -! virtual const char* what( void ) const { return _what.c_str(); } - }; - - #else //origional, default exception style ---- 10,65 ---- - // with --enable-exception flag. - - //: Exception thrown when a BadQuery is encountered -! class BadQuery : public std::exception { - public: -! BadQuery(const std::string &er = "") : error(er) {} -! ~BadQuery() throw () {} -! const std::string error; //: The error message -! virtual const char* what( void ) const throw () { return error.c_str(); } - }; - - //: Exception structure thrown when a bad conversion takes place -! class BadConversion : public std::exception { -! const std::string _what; - public: - const char* type_name; //: -! const std::string data; //: - size_t retrieved; //: - size_t actual_size;//: - BadConversion(const char* tn, const char* d, size_t r, size_t a) -! : _what(std::string("Tried to convert \"") + std::string(d ? d : "") + "\" to a \"" + std::string(tn ? tn : "")), - type_name(tn), data(d), retrieved(r), actual_size(a) {}; - -! BadConversion(const std::string &wt, const char* tn, const char* d, size_t r, size_t a) - : _what(wt), type_name(tn), data(d), retrieved(r), actual_size(a) {}; - -! BadConversion(const std::string& wt = "") - : _what(wt), type_name("unknown"), data(""), retrieved(0), actual_size(0) {}; -+ ~BadConversion() throw () {} - -! virtual const char* what( void ) const throw () { return _what.c_str(); } - }; - - //: Thrown when a *Null* value is trying to be converted into a type - //: it can't convert to. -! class BadNullConversion : public std::exception { -! const std::string _what; - public: -! BadNullConversion(const std::string &wt = "") : _what(wt) {} -! ~BadNullConversion() throw () {} -! virtual const char* what( void ) const throw () { return _what.c_str(); } - }; - - //: Exception thrown when not enough parameters are provided - // Thrown when not enough parameters are provided for a - // template query. -! class SQLQueryNEParms : public std::exception { -! const std::string _what; - public: -! SQLQueryNEParms(const char *c) : _what(std::string(c ? c : "")), error(c) {} -! ~SQLQueryNEParms() throw () {} - const char* error; //: -! virtual const char* what( void ) const throw () { return _what.c_str(); } - }; - - #else //origional, default exception style -Nur in mysql++-1.7.9-gcc3.2/sqlplusint: exceptions.hh.in~. -diff -rc mysql++-1.7.9-gcc3.0/sqlplusint/null1.hh mysql++-1.7.9-gcc3.2/sqlplusint/null1.hh -*** mysql++-1.7.9-gcc3.0/sqlplusint/null1.hh 2001-05-19 18:44:48.000000000 +0200 ---- mysql++-1.7.9-gcc3.2/sqlplusint/null1.hh 2002-10-17 12:31:55.000000000 +0200 -*************** -*** 1,7 **** - #ifndef __null1_hh__ - #define __null1_hh__ - -! #include <ostream.h> - #include "exceptions.hh" - #include "define_short" - ---- 1,7 ---- - #ifndef __null1_hh__ - #define __null1_hh__ - -! #include <ostream> - #include "exceptions.hh" - #include "define_short" - -*************** -*** 18,36 **** - //: Type to use for the behavior parameter for *Null<>* - struct NullisNull { - static null_type null_is() {return null_type();} -! static ostream& null_ostr(ostream& o) {o << "(NULL)"; return o;} - }; - - //: Type to use for the behavior parameter for *Null<>* - struct NullisZero { - static int null_is() {return 0;} -! static ostream& null_ostr(ostream &o) {o << 0; return o;} - }; - - //: Type to use for the behavior parameter for *Null<>* - struct NullisBlank { - static const char * null_is() {return "";} -! static ostream& null_ostr(ostream &o) {o << ""; return o;} - }; - - //: Container class for holding null types. ---- 18,36 ---- - //: Type to use for the behavior parameter for *Null<>* - struct NullisNull { - static null_type null_is() {return null_type();} -! static std::ostream& null_ostr(std::ostream& o) {o << "(NULL)"; return o;} - }; - - //: Type to use for the behavior parameter for *Null<>* - struct NullisZero { - static int null_is() {return 0;} -! static std::ostream& null_ostr(std::ostream &o) {o << 0; return o;} - }; - - //: Type to use for the behavior parameter for *Null<>* - struct NullisBlank { - static const char * null_is() {return "";} -! static std::ostream& null_ostr(std::ostream &o) {o << ""; return o;} - }; - - //: Container class for holding null types. -Nur in mysql++-1.7.9-gcc3.2/sqlplusint: null1.hh~. -diff -rc mysql++-1.7.9-gcc3.0/sqlplusint/null2.hh mysql++-1.7.9-gcc3.2/sqlplusint/null2.hh -*** mysql++-1.7.9-gcc3.0/sqlplusint/null2.hh 2001-05-19 18:44:48.000000000 +0200 ---- mysql++-1.7.9-gcc3.2/sqlplusint/null2.hh 2002-10-17 12:36:42.000000000 +0200 -*************** -*** 4,10 **** - #include "null1.hh" - - template <class Type, class Behavior> -! inline ostream& operator << (ostream &o, const Null<Type,Behavior> &n) { - if (n.is_null) return Behavior::null_ostr(o); - else return o << n.data; - } ---- 4,10 ---- - #include "null1.hh" - - template <class Type, class Behavior> -! inline std::ostream& operator << (std::ostream &o, const Null<Type,Behavior> &n) { - if (n.is_null) return Behavior::null_ostr(o); - else return o << n.data; - } -Nur in mysql++-1.7.9-gcc3.2/sqlplusint: null2.hh~. -diff -rc mysql++-1.7.9-gcc3.0/sqlplusint/set3.hh mysql++-1.7.9-gcc3.2/sqlplusint/set3.hh -*** mysql++-1.7.9-gcc3.0/sqlplusint/set3.hh 2001-05-19 18:44:48.000000000 +0200 ---- mysql++-1.7.9-gcc3.2/sqlplusint/set3.hh 2002-10-17 12:17:50.000000000 +0200 -*************** -*** 6,14 **** - - template <class Insert> - void set2container (const char *str, Insert insert) { -- MutableColData s(false); - while (1) { -! s = ""; - while (*str != ',' && *str) { - s += *str; - str++; ---- 6,13 ---- - - template <class Insert> - void set2container (const char *str, Insert insert) { - while (1) { -! MutableColData s(""); - while (*str != ',' && *str) { - s += *str; - str++; -Nur in mysql++-1.7.9-gcc3.2/sqlplusint: set3.hh~. diff --git a/dev-db/mysql++/mysql++-1.7.9-r1.ebuild b/dev-db/mysql++/mysql++-1.7.9-r1.ebuild new file mode 100644 index 000000000000..c353bf5f7fec --- /dev/null +++ b/dev-db/mysql++/mysql++-1.7.9-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Maintainer: Ric Messier <kilroy@WasHere.COM> +# /space/gentoo/cvsroot/gentoo-x86/skel.ebuild,v 1.4 2002/03/12 16:05:09 tod Exp + +S=${WORKDIR}/${P} + +DESCRIPTION="C++ API interface to the MySQL database" + +SRC_URI="http://mysql.he.net/Downloads/${PN}/${P}.tar.gz + http://mysql.adgrafix.com/Downloads/${PN}/${P}.tar.gz + http://mysql.fastmirror.com/Downloads/${PN}/${P}.tar.gz + http://mysql.oms-net.nl/Downloads/${PN}/${P}.tar.gz + mirror://gentoo/mysql++-gcc-3.0.patch.gz" + +# This is the download page but includes links to other places +HOMEPAGE="http://www.mysql.org/downloads/api-mysql++.html" + +IUSE="" +SLOT="0" +KEYWORDS="~x86" +LICENSE="LGPL-2" +DEPEND=">=dev-db/mysql-3.23.49" + +src_compile() { + + if [[ "${COMPILER}" == "gcc3" ]];then + EPATCH_SINGLE_MSG="Patching for gcc 3.0..." + epatch ${DISTDIR}/mysql++-gcc-3.0.patch.gz + EPATCH_SINGLE_MSG="Patching for gcc 3.2..." + epatch ${DISTDIR}/mysql++-gcc-3.2.patch.gz + EPATCH_SINGLE_MSG="Patching to fix some warnings and errors..." + epatch ${FILESDIR}/mysql++-1.7.9-gcc_throw.patch + EPATCH_SINGLE_MSG="Patch for const char* error" + epatch ${FILESDIR}/mysql++-1.7.9-mysql4-gcc3.patch + else + EPATCH_SINGLE_MSG="Patch for const char* error" + epatch ${FILESDIR}/mysql++-1.7.9-mysql4-gcc295.patch + fi + EPATCH_SINGLE_MSG="fixing examples directory bug..." + epatch ${FILESDIR}/mysql++-1.7.9_example.patch + + local myconf + # we want C++ exceptions turned on + myconf="--enable-exceptions" + # We do this because of the large number of header files installed to the include directory + # This is a breakage compared to previous versions that installed straight to /usr/include + myconf="${myconf} --includedir=/usr/include/mysql++" + # not including the directives to where MySQL is because it seems to find it + # just fine without + # force the cflags into place otherwise they get totally ignored by configure + CFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS} ${CXXFLAGS}" econf \ + --enable-exceptions \ + --includedir=/usr/include/mysql++ + + emake || die "unable to make" +} + +src_install () { + make DESTDIR=${D} install || die + # install the docs and HTML pages + dodoc README LGPL + dodoc doc/* + dohtml doc/man-html/* + ewarn "The MySQL++ include directory has changed compared to previous versions" + ewarn "It was previously /usr/include, but now it is /usr/include/mysql++" +} + +pkg_postinst() { + ewarn "The MySQL++ include directory has changed compared to previous versions" + ewarn "It was previously /usr/include, but now it is /usr/include/mysql++" +} |