From ed7504195a9f410c4d00e1f52a2c06357de7efc2 Mon Sep 17 00:00:00 2001
From: Rene Brun <Rene.Brun@cern.ch>
Date: Mon, 17 Jul 2006 12:36:49 +0000
Subject: [PATCH] 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
---
 mysql/src/TMySQLServer.cxx    | 12 ++++++------
 mysql/src/TMySQLStatement.cxx | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/mysql/src/TMySQLServer.cxx b/mysql/src/TMySQLServer.cxx
index 2c91886c367..a19e01ae217 100644
--- a/mysql/src/TMySQLServer.cxx
+++ b/mysql/src/TMySQLServer.cxx
@@ -1,4 +1,4 @@
-// @(#)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
 
 /*************************************************************************
@@ -142,11 +142,11 @@ TMySQLServer::~TMySQLServer()
 // check last mysql error code
 #define CheckErrNo(method, force, res)                  \
    {                                                    \
-      unsigned int errno = mysql_errno(fMySQL);         \
-      if ((errno!=0) || force) {                        \
-         const char* errmsg = mysql_error(fMySQL);      \
-         if (errno==0) { errno = 11111; errmsg = "MySQL error"; } \
-         SetError(errno, errmsg, method);               \
+      unsigned int sqlerrno = mysql_errno(fMySQL);         \
+      if ((sqlerrno!=0) || force) {                        \
+         const char* sqlerrmsg = mysql_error(fMySQL);      \
+         if (sqlerrno==0) { sqlerrno = 11111; sqlerrmsg = "MySQL error"; } \
+         SetError(sqlerrno, sqlerrmsg, method);               \
          return res;                                    \
       }                                                 \
    }
diff --git a/mysql/src/TMySQLStatement.cxx b/mysql/src/TMySQLStatement.cxx
index 3c03d12d6c3..0628303fcde 100644
--- a/mysql/src/TMySQLStatement.cxx
+++ b/mysql/src/TMySQLStatement.cxx
@@ -1,4 +1,4 @@
-// @(#)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
 
 /*************************************************************************
@@ -83,11 +83,11 @@ void TMySQLStatement::Close(Option_t *)
 // check last mysql statement error code
 #define CheckErrNo(method, force, res)                  \
    {                                                    \
-      unsigned int errno = mysql_stmt_errno(fStmt);     \
-      if ((errno!=0) || force) {                        \
-         const char* errmsg = mysql_stmt_error(fStmt);  \
-         if (errno==0) { errno = 11111; errmsg = "MySQL statement error"; } \
-         SetError(errno, errmsg, method);               \
+      unsigned int stmterrno = mysql_stmt_errno(fStmt);     \
+      if ((stmterrno!=0) || force) {                        \
+         const char* stmterrmsg = mysql_stmt_error(fStmt);  \
+         if (stmterrno==0) { stmterrno = 11111; stmterrmsg = "MySQL statement error"; } \
+         SetError(stmterrno, stmterrmsg, method);               \
          return res;                                    \
       }                                                 \
    }
-- 
GitLab