Tom Tromey wrote:
"Andreas" == Andreas Tobler <[EMAIL PROTECTED]> writes:
Andreas> the attached patch fixes the current cvs on darwin-ppc. Not tested on
Andreas> functionality yet. But it builds :)
This mostly looks ok to me. I just had one question.
Andreas> +#if defined (HAVE_MSG_NOSIGNAL)
Andreas> +#define SOCKET_NOSIGNAL MSG_NOSIGNAL
Andreas> +#elif defined (HAVE_SO_NOSIGPIPE)
Andreas> +#define SOCKET_NOSIGNAL SO_NOSIGPIPE
Andreas> +#else
Andreas> +#define SOCKET_NOSIGNAL 0
Andreas> +#endif
Why default to 0 here? If we don't know what to do perhaps it would
be better to #error.
Ok with this change ?
--- native/jni/native-lib/cpnet.c 21 Aug 2006 23:34:46 -0000 1.2
+++ native/jni/native-lib/cpnet.c 31 Aug 2006 19:01:38 -0000
@@ -54,6 +54,14 @@
#define SOCKET_DEFAULT_TIMEOUT -1 /* milliseconds */
+#if defined (HAVE_MSG_NOSIGNAL)
+#define SOCKET_NOSIGNAL MSG_NOSIGNAL
+#elif defined (HAVE_SO_NOSIGPIPE)
+#define SOCKET_NOSIGNAL SO_NOSIGPIPE
+#else
+#error "No suitable flag found to ommit a SIGPIPE on signal errors with
send()."
+#endif
+
Andreas