Date: Friday, May 4, 2007 @ 15:53:39
Author: marc
Path: /cvsroot/carob/libmysequoia
Modified: include/CarobCommon.hpp (1.6 -> 1.7) src/CarobCommon.cpp (1.16
-> 1.17) src/CarobMySQL.cpp (1.106 -> 1.107) src/CarobStmt.cpp
(1.48 -> 1.49) src/Utils.cpp (1.51 -> 1.52)
Moved inclusion of polluting log4cxx header (config.h) from
CarobCommon.hpp to .cpp files, close to _our_ config.h. Added
appropriate warnings in the code. See LMS-40.
-------------------------+
include/CarobCommon.hpp | 11 +++++++++--
src/CarobCommon.cpp | 3 +++
src/CarobMySQL.cpp | 2 ++
src/CarobStmt.cpp | 3 +++
src/Utils.cpp | 3 +++
5 files changed, 20 insertions(+), 2 deletions(-)
Index: libmysequoia/include/CarobCommon.hpp
diff -u libmysequoia/include/CarobCommon.hpp:1.6
libmysequoia/include/CarobCommon.hpp:1.7
--- libmysequoia/include/CarobCommon.hpp:1.6 Fri Mar 16 16:37:54 2007
+++ libmysequoia/include/CarobCommon.hpp Fri May 4 15:53:39 2007
@@ -29,8 +29,15 @@
#include <carob/ResultSetMetaData.hpp>
#include <carob/CarobException.hpp>
-// include log4cxx header files.
-#include <log4cxx/logger.h>
+// log4cxx forwards. Log4cxx should provide this.
+namespace log4cxx {
+ namespace helpers {
+ template<typename T> class ObjectPtrT;
+ }
+ class Logger;
+ /** smart pointer to a Logger class */
+ typedef helpers::ObjectPtrT<Logger> LoggerPtr;
+}
class CarobCommon
{
Index: libmysequoia/src/CarobCommon.cpp
diff -u libmysequoia/src/CarobCommon.cpp:1.16
libmysequoia/src/CarobCommon.cpp:1.17
--- libmysequoia/src/CarobCommon.cpp:1.16 Thu Mar 22 19:29:27 2007
+++ libmysequoia/src/CarobCommon.cpp Fri May 4 15:53:39 2007
@@ -27,6 +27,9 @@
/* MySQL include */
#include <mysql/errmsg.h>
+// order matters here since log4cxx tends to export its private config.h file
(!)
+#include <log4cxx/logger.h>
+
using namespace CarobNS;
using namespace log4cxx;
Index: libmysequoia/src/CarobMySQL.cpp
diff -u libmysequoia/src/CarobMySQL.cpp:1.106
libmysequoia/src/CarobMySQL.cpp:1.107
--- libmysequoia/src/CarobMySQL.cpp:1.106 Fri May 4 12:22:54 2007
+++ libmysequoia/src/CarobMySQL.cpp Fri May 4 15:53:39 2007
@@ -36,6 +36,8 @@
#include <string>
#include <algorithm>
+// order matters here since log4cxx tends to export its private config.h file
(!)
+#include <log4cxx/logger.h>
#include "config.h"
#define MYSEQUOIA_CONFIG_FILE "mysequoia.conf"
Index: libmysequoia/src/CarobStmt.cpp
diff -u libmysequoia/src/CarobStmt.cpp:1.48 libmysequoia/src/CarobStmt.cpp:1.49
--- libmysequoia/src/CarobStmt.cpp:1.48 Thu Mar 22 19:29:27 2007
+++ libmysequoia/src/CarobStmt.cpp Fri May 4 15:53:39 2007
@@ -36,6 +36,9 @@
#include <mysql/my_alloc.h>
#include <mysql/errmsg.h>
+// order matters here since log4cxx tends to export its private config.h file
(!)
+#include <log4cxx/logger.h>
+
using namespace CarobNS;
using namespace std;
Index: libmysequoia/src/Utils.cpp
diff -u libmysequoia/src/Utils.cpp:1.51 libmysequoia/src/Utils.cpp:1.52
--- libmysequoia/src/Utils.cpp:1.51 Wed Apr 4 16:58:39 2007
+++ libmysequoia/src/Utils.cpp Fri May 4 15:53:39 2007
@@ -39,6 +39,9 @@
#include <ctype.h>
#include <cfloat>
+// order matters here since log4cxx tends to export its private config.h file
(!)
+#include <log4cxx/logger.h>
+
#include "config.h" // HAVE_STRNLEN
using namespace CarobNS;
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits