Skip to content
Snippets Groups Projects
Commit ed750419 authored by Rene Brun's avatar Rene Brun
Browse files

From Sergey:

I have used "errno" name for variable, which is used in <errno.h> include.
Problem appears in MaxOS. In fix I just rename "errno" to "sqlerrno".


git-svn-id: http://root.cern.ch/svn/root/trunk@15815 27541ba8-7e3a-0410-8455-c3a389f83636
parent b3dd274b
No related branches found
No related tags found
No related merge requests found
// @(#)root/mysql:$Name: $:$Id: TMySQLServer.cxx,v 1.15 2006/07/10 11:05:50 brun Exp $ // @(#)root/mysql:$Name: $:$Id: TMySQLServer.cxx,v 1.16 2006/07/11 10:34:23 brun Exp $
// Author: Fons Rademakers 15/02/2000 // Author: Fons Rademakers 15/02/2000
/************************************************************************* /*************************************************************************
...@@ -142,11 +142,11 @@ TMySQLServer::~TMySQLServer() ...@@ -142,11 +142,11 @@ TMySQLServer::~TMySQLServer()
// check last mysql error code // check last mysql error code
#define CheckErrNo(method, force, res) \ #define CheckErrNo(method, force, res) \
{ \ { \
unsigned int errno = mysql_errno(fMySQL); \ unsigned int sqlerrno = mysql_errno(fMySQL); \
if ((errno!=0) || force) { \ if ((sqlerrno!=0) || force) { \
const char* errmsg = mysql_error(fMySQL); \ const char* sqlerrmsg = mysql_error(fMySQL); \
if (errno==0) { errno = 11111; errmsg = "MySQL error"; } \ if (sqlerrno==0) { sqlerrno = 11111; sqlerrmsg = "MySQL error"; } \
SetError(errno, errmsg, method); \ SetError(sqlerrno, sqlerrmsg, method); \
return res; \ return res; \
} \ } \
} }
......
// @(#)root/mysql:$Name: $:$Id: TMySQLStatement.cxx,v 1.5 2006/06/29 20:36:43 brun Exp $ // @(#)root/mysql:$Name: $:$Id: TMySQLStatement.cxx,v 1.6 2006/06/30 06:36:35 brun Exp $
// Author: Sergey Linev 6/02/2006 // Author: Sergey Linev 6/02/2006
/************************************************************************* /*************************************************************************
...@@ -83,11 +83,11 @@ void TMySQLStatement::Close(Option_t *) ...@@ -83,11 +83,11 @@ void TMySQLStatement::Close(Option_t *)
// check last mysql statement error code // check last mysql statement error code
#define CheckErrNo(method, force, res) \ #define CheckErrNo(method, force, res) \
{ \ { \
unsigned int errno = mysql_stmt_errno(fStmt); \ unsigned int stmterrno = mysql_stmt_errno(fStmt); \
if ((errno!=0) || force) { \ if ((stmterrno!=0) || force) { \
const char* errmsg = mysql_stmt_error(fStmt); \ const char* stmterrmsg = mysql_stmt_error(fStmt); \
if (errno==0) { errno = 11111; errmsg = "MySQL statement error"; } \ if (stmterrno==0) { stmterrno = 11111; stmterrmsg = "MySQL statement error"; } \
SetError(errno, errmsg, method); \ SetError(stmterrno, stmterrmsg, method); \
return res; \ return res; \
} \ } \
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment