Hi.

I am trying to get carob running on my mac, and have had the following issues:

- gnu's c++ locale only works when you use glibc, (which OS/X doesn't, but default it uses UTF8) - MSG_NOSIGNAL doesn't exist on OS/X. so I am replacing the signal handler instead.

here is the diff so far...
it doesn't pass all the tests, but the 'read_example' runs.

the output of carobTestLauncher is
1) test: encode_decode (E)
uncaught exception of unknown type

(and I disabled the locale test, as it won't work without glibc's locale)

libmysequoia isn't fairing as well I'm afraid .. 13/18 tests are failing ;(




Helios:/src/java/continuent/carob/src ianh$ cvs diff
Index: Common.cpp
===================================================================
RCS file: /cvsroot/carob/carob/src/Common.cpp,v
retrieving revision 1.18
diff -u -r1.18 Common.cpp
--- Common.cpp  19 Dec 2005 18:32:03 -0000      1.18
+++ Common.cpp  4 Jan 2006 01:58:58 -0000
@@ -36,7 +36,8 @@
 // TODO: it would be nice to be able to get this at runtime
 // (in a non-portable way quite obviously...)
 // On linux try "locale -a"
-#define NAME_OF_ANY_UTF8_LOCALE_AVAILABLE "en_US.utf8"
+//#define NAME_OF_ANY_UTF8_LOCALE_AVAILABLE "en_US.utf8"
+#define NAME_OF_ANY_UTF8_LOCALE_AVAILABLE "C"

 void CarobNS::setLogLevel(const LogLevel l)
 {
Index: Connection.cpp
===================================================================
RCS file: /cvsroot/carob/carob/src/Connection.cpp,v
retrieving revision 1.48
diff -u -r1.48 Connection.cpp
--- Connection.cpp      30 Dec 2005 17:23:40 -0000      1.48
+++ Connection.cpp      4 Jan 2006 01:58:59 -0000
@@ -26,7 +26,18 @@
 using std::wstring;

 using namespace CarobNS;
-
+static void UNIXIgnoreSIGPIPE(void)
+{
+    int err;
+    struct sigaction signalState;
+    err = sigaction(SIGPIPE, NULL, &signalState);
+//    err = MoreUNIXErrno(err);
+    if (err == 0) {
+        signalState.sa_handler = SIG_IGN;
+        err = sigaction(SIGPIPE, &signalState, NULL);
+//        err = MoreUNIXErrno(err);
+    }
+}
 Connection::Connection(const ConnectionParameters& prms)
throw (ConnectionException, AuthenticationException, UnexpectedException) :
   isClosed(true),
@@ -35,6 +46,7 @@
   writeExecutedInTransaction(false),
   mustBeginTransaction(false)
 {
+    UNIXIgnoreSIGPIPE();
   wstring fctName(L"Connection::Connection");
   if (isInfoEnabled())
   {
Index: JavaSocket.cpp
===================================================================
RCS file: /cvsroot/carob/carob/src/JavaSocket.cpp,v
retrieving revision 1.26
diff -u -r1.26 JavaSocket.cpp
--- JavaSocket.cpp      22 Dec 2005 14:58:56 -0000      1.26
+++ JavaSocket.cpp      4 Jan 2006 01:58:59 -0000
@@ -30,6 +30,11 @@

 using namespace CarobNS;

+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+//MSG_NOSIGNAL needs a sigpipe handler set to null setup!
+#endif
+
 JavaSocket::JavaSocket() :
 socketFd(-1),
 connected(false)


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

Reply via email to