fix X11 define/typedef clashes as used in mysqlgui with new fltk

This commit is contained in:
wilfried 2002-08-10 20:07:02 +00:00
parent d2f742606d
commit 2f235a092e
8 changed files with 270 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.10 2002/05/15 09:30:21 wilfried Exp $
# $OpenBSD: Makefile,v 1.11 2002/08/10 20:07:02 wilfried Exp $
COMMENT= "C++ API for MySQL"
COMMENT-docs= "C++ API for MySQL documentation"
@ -7,7 +7,6 @@ VERSION= 1.7.9
DISTNAME= mysql++-${VERSION}
PKGNAME-docs= mysql++-docs-${VERSION}
CATEGORIES= devel
NEED_VERSION= 1.482
HOMEPAGE= http://www.mysql.com/downloads/api-mysql++.html
@ -37,6 +36,9 @@ NO_REGRESS= Yes
USE_GMAKE= Yes
CONFIGURE_STYLE= gnu
post-extract:
@rm -rf ${WKRSRC}/sqlplusint/.deps
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mysql++/html
${INSTALL_DATA} ${WRKSRC}/doc/man-html/* ${PREFIX}/share/doc/mysql++/html

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-doc_man-html_5_Class_html,v 1.1 2001/06/08 08:55:23 wilfried Exp $
$OpenBSD: patch-doc_man-html_5_Class_html,v 1.2 2002/08/10 20:07:02 wilfried Exp $
--- doc/man-html/5_Class.html.orig Sat May 19 18:44:46 2001
+++ doc/man-html/5_Class.html Fri Jun 8 10:40:04 2001
+++ doc/man-html/5_Class.html Fri Aug 9 16:07:16 2002
@@ -124,7 +124,7 @@ original version by: Nikos Drakos, CBLU
<LI><A NAME="tex2html1592"
HREF="5_Class.html#SECTION03232600000000000000">public operator bool ()</A>
@ -10,6 +10,15 @@ $OpenBSD: patch-doc_man-html_5_Class_html,v 1.1 2001/06/08 08:55:23 wilfried Exp
<LI><A NAME="tex2html1594"
HREF="5_Class.html#SECTION03232800000000000000">public void close ()</A>
<LI><A NAME="tex2html1595"
@@ -1502,7 +1502,7 @@ original version by: Nikos Drakos, CBLU
HREF="5_Class.html#SECTION032253000000000000000">Protected methods</A>
<UL>
<LI><A NAME="tex2html2005"
- HREF="5_Class.html#SECTION032253100000000000000">protected bool Success </A>
+ HREF="5_Class.html#SECTION032253100000000000000">protected bool Success_ </A>
<LI><A NAME="tex2html2006"
HREF="5_Class.html#SECTION032253200000000000000">protected char* errmsg </A>
<LI><A NAME="tex2html2007"
@@ -3123,7 +3123,7 @@ Public methods</A>
<LI>operator <B>bool</B> ()
<BR><EM>returns success()</EM>
@ -28,3 +37,21 @@ $OpenBSD: patch-doc_man-html_5_Class_html,v 1.1 2001/06/08 08:55:23 wilfried Exp
</H3>
@@ -8055,7 +8055,7 @@ Protected methods</A>
</H3>
<UL>
-<LI>bool <B>Success</B>
+<LI>bool <B>Success_</B>
</LI>
<LI>char* <B>errmsg</B>
</LI>
@@ -8248,7 +8248,7 @@ Protected methods</A>
<P>
<H3><A NAME="SECTION032253100000000000000">
-protected bool Success </A>
+protected bool Success_ </A>
</H3>

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-sqlplusint_connection1_hh,v 1.1 2002/08/10 20:07:02 wilfried Exp $
--- sqlplusint/connection1.hh.orig Sat May 19 18:44:49 2001
+++ sqlplusint/connection1.hh Fri Aug 9 16:09:35 2002
@@ -31,12 +31,12 @@ private:
MYSQL mysql;
bool is_connected;
bool locked;
- bool Success;
+ bool Success_;
public:
Connection () : throw_exceptions(true), locked(false)
{mysql_init(&mysql);} //:
- Connection (bool te) : throw_exceptions(te), is_connected(false), locked(true), Success(false) //:
+ Connection (bool te) : throw_exceptions(te), is_connected(false), locked(true), Success_(false) //:
{mysql_init(&mysql);} //:
Connection (const char *db, const char *host = "", const char *user = "",
const char *passwd = "", bool te = true); //:
@@ -57,7 +57,7 @@ public:
bool connected() const {return is_connected;}
//: returns true if a successful connection was made
- bool success() {return Success;}
+ bool success() {return Success_;}
//: returns true of the last query was successful
bool connect (cchar *db = "", cchar *host = "",

View File

@ -0,0 +1,135 @@
$OpenBSD: patch-sqlplusint_connection_cc,v 1.3 2002/08/10 20:07:02 wilfried Exp $
--- sqlplusint/connection.cc.orig Sat May 19 18:44:48 2001
+++ sqlplusint/connection.cc Fri Aug 9 16:10:03 2002
@@ -10,11 +10,11 @@ Connection::Connection (const char *db,
if (real_connect (db, host, user, passwd,3306,0,60,NULL,0))
{
locked = false;
- Success = is_connected = true;
+ Success_ = is_connected = true;
}
else
{
- locked = false; Success = is_connected = false;
+ locked = false; Success_ = is_connected = false;
if (throw_exceptions) throw BadQuery(error());
}
}
@@ -29,11 +29,11 @@ Connection::Connection (const char *db,
if (real_connect (db, host, user, passwd, port, compress, connect_timeout,socket_name, client_flag))
{
locked = false;
- Success = is_connected = true;
+ Success_ = is_connected = true;
}
else
{
- locked = false; Success = is_connected = false;
+ locked = false; Success_ = is_connected = false;
if (throw_exceptions) throw BadQuery(error());
}
}
@@ -52,18 +52,18 @@ bool Connection::real_connect (cchar *db
if (mysql_real_connect(&mysql,host,user,passwd,db, port,socket_name,client_flag))
{
locked = false;
- Success = is_connected = true;
+ Success_ = is_connected = true;
}
else
{
- locked = false; Success = is_connected = false;
+ locked = false; Success_ = is_connected = false;
if (throw_exceptions) throw BadQuery(error());
}
// mysql.options.my_cnf_file=0;
- if (!Success) return Success;
+ if (!Success_) return Success_;
if (db && db[0]) // if db is not empty
- Success = select_db(db);
- return Success;
+ Success_ = select_db(db);
+ return Success_;
}
Connection::~Connection () {
@@ -95,17 +95,17 @@ bool Connection::connect (cchar *db, cch
if (mysql_real_connect(&mysql,host,user,passwd,db, 3306,NULL,0)) {
locked = false;
- Success = is_connected = true;
+ Success_ = is_connected = true;
} else {
locked = false;
if (throw_exceptions) throw BadQuery(error());
- Success = is_connected = false;
+ Success_ = is_connected = false;
}
// mysql.options.my_cnf_file=0;
- if (!Success) return Success;
+ if (!Success_) return Success_;
if (db && db[0]) // if db is not empty
- Success = select_db(db);
- return Success;
+ Success_ = select_db(db);
+ return Success_;
}
string Connection::info () {
@@ -117,44 +117,44 @@ string Connection::info () {
}
ResNSel Connection::execute(const string &str, bool throw_excptns) {
- Success = false;
+ Success_ = false;
if (lock())
if (throw_excptns) throw BadQuery(error());
else return ResNSel();
- Success = !mysql_query(&mysql, str.c_str());
+ Success_ = !mysql_query(&mysql, str.c_str());
unlock();
- if (!Success)
+ if (!Success_)
if (throw_excptns) throw BadQuery(error());
else return ResNSel();
return ResNSel(this);
}
bool Connection::exec(const string &str) {
- Success = !mysql_query(&mysql,str.c_str());
- if (!Success && throw_exceptions) throw BadQuery(error());
- return Success;
+ Success_ = !mysql_query(&mysql,str.c_str());
+ if (!Success_ && throw_exceptions) throw BadQuery(error());
+ return Success_;
}
Result Connection::store(const string &str, bool throw_excptns) {
- Success = false;
+ Success_ = false;
if (lock())
if (throw_excptns) throw BadQuery(error());
else return Result();
- Success = !mysql_query(&mysql, str.c_str());
+ Success_ = !mysql_query(&mysql, str.c_str());
unlock();
- if (!Success)
+ if (!Success_)
if (throw_excptns) throw BadQuery(error());
else return Result();
return Result(mysql_store_result(&mysql));
}
ResUse Connection::use(const string &str, bool throw_excptns) {
- Success = false;
+ Success_ = false;
if (lock())
if (throw_excptns) throw BadQuery(error());
else return ResUse();
- Success = !mysql_query(&mysql, str.c_str());
- if (!Success)
+ Success_ = !mysql_query(&mysql, str.c_str());
+ if (!Success_)
if (throw_excptns) throw BadQuery(error());
else return ResUse();
return ResUse(mysql_use_result(&mysql), this);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-sqlplusint_query1_hh,v 1.1 2002/08/10 20:07:02 wilfried Exp $
--- sqlplusint/query1.hh.orig Sat May 19 18:44:48 2001
+++ sqlplusint/query1.hh Fri Aug 9 16:10:16 2002
@@ -31,7 +31,7 @@ private:
public:
Query(Connection *m, bool te = false)
- {mysql = m;errmsg=NULL;Success = true;throw_exceptions=te;}
+ {mysql = m;errmsg=NULL;Success_ = true;throw_exceptions=te;}
//: Create a new query object attached to a connection.
Query(const Query &q); //:
Query& operator = (const Query &q); //:

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-sqlplusint_query2_hh,v 1.1 2002/08/10 20:07:02 wilfried Exp $
--- sqlplusint/query2.hh.orig Sat May 19 18:44:48 2001
+++ sqlplusint/query2.hh Fri Aug 9 16:10:19 2002
@@ -7,7 +7,7 @@
#include "coldata2.hh"
inline bool Query::success() {
- if (!Success) return false;
+ if (!Success_) return false;
return mysql->success();
}

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-sqlplusint_sql_query1_hh,v 1.1 2002/08/10 20:07:02 wilfried Exp $
--- sqlplusint/sql_query1.hh.orig Sat May 19 18:44:48 2001
+++ sqlplusint/sql_query1.hh Fri Aug 9 16:10:07 2002
@@ -112,7 +112,7 @@ class SQLQuery : public strstream {
private:
char* preview_char();
protected:
- bool Success;
+ bool Success_;
char* errmsg;
vector<SQLParseElement> parsed;
vector<string> parsed_names;
@@ -122,7 +122,7 @@ protected:
void proc(parms &p);
public:
- SQLQuery(): Success(false), errmsg(NULL), def(this) {parsed.empty(); parsed_names.empty(); parsed_nums.empty();} //:
+ SQLQuery(): Success_(false), errmsg(NULL), def(this) {parsed.empty(); parsed_names.empty(); parsed_nums.empty();} //:
SQLQuery(const SQLQuery &q); //:
SQLQuery& operator = (const SQLQuery &q); //:
@@ -131,7 +131,7 @@ public:
void parse();
string error () const {return errmsg;}
- bool success() const {return Success;}
+ bool success() const {return Success_;}
operator bool () {return success();}
bool operator ! () {return !success();}

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-sqlplusint_sql_query_cc,v 1.1 2002/08/10 20:07:02 wilfried Exp $
--- sqlplusint/sql_query.cc.orig Sat May 19 18:44:48 2001
+++ sqlplusint/sql_query.cc Fri Aug 9 16:10:14 2002
@@ -12,7 +12,7 @@
SQLQuery::SQLQuery(const SQLQuery &q) {
*this << q.str();
- Success = q.Success;
+ Success_ = q.Success_;
def = q.def;
}
@@ -20,7 +20,7 @@ SQLQuery::SQLQuery(const SQLQuery &q) {
SQLQuery& SQLQuery::operator = (const SQLQuery &q) {
reset();
*this << q.str();
- Success = q.Success;
+ Success_ = q.Success_;
def = q.def;
return *this;
}