Date: Thursday, January 11, 2007 @ 11:34:43
  Author: marc
    Path: /cvsroot/carob/carob

Modified: include/Common.hpp (1.53 -> 1.54) src/Common.cpp (1.58 -> 1.59)

Implemented linking-time check for -DCAROB_USE_ICONV lib/client incompatibility
instead of crash. CAROB-79


--------------------+
 include/Common.hpp |   12 ++++++++++++
 src/Common.cpp     |    7 +++++++
 2 files changed, 19 insertions(+)


Index: carob/include/Common.hpp
diff -u carob/include/Common.hpp:1.53 carob/include/Common.hpp:1.54
--- carob/include/Common.hpp:1.53       Thu Jan 11 10:19:29 2007
+++ carob/include/Common.hpp    Thu Jan 11 11:34:42 2007
@@ -59,6 +59,18 @@
 
 namespace CarobNS {
 
+// This is to check that carob and its client are in sync concerning
+// -DCAROB_USE_ICONV. Before this linking-time check a run-time
+// segfault happened instead.
+// Ideally both versions of carob should be ABI-compatible in the future
+#ifdef CAROB_USE_ICONV
+extern bool use_iconv;
+static bool check_use_iconv = use_iconv;
+#else
+extern bool no_iconv;
+static bool check_no_iconv = no_iconv;
+#endif
+
 /** Java byte (signed) */
 typedef   int8_t    java_byte;
 
Index: carob/src/Common.cpp
diff -u carob/src/Common.cpp:1.58 carob/src/Common.cpp:1.59
--- carob/src/Common.cpp:1.58   Mon Jan  8 21:13:14 2007
+++ carob/src/Common.cpp        Thu Jan 11 11:34:43 2007
@@ -54,6 +54,13 @@
 using std::endl;
 
 
+// see explanation in Common.hpp
+#ifdef CAROB_USE_ICONV
+bool CarobNS::use_iconv = true;
+#else
+bool CarobNS::no_iconv = true;
+#endif
+
 
 #ifdef CAROB_LOG4CXX_NAME
 

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to