[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-coda
Subject: lwp fails on NetBSD
From: Greg Troxel <gdt () ir ! bbn ! com>
Date: 2005-06-27 19:46:38
Message-ID: 20050627194638.8D81352F0 () fnord ! ir ! bbn ! com
[Download RAW message or body]
lwp head fails to build on NetBSD/i386 1.6.2 because it contains
declarations after code. Patch appended to fix it. With this,
lwptest-static runs fine. But, this is w/o ucontext but w/
sigaltstack.
But, the same static binary copied to a 2.99.15 system and a 2.0
system segfaults, apparently in errno() in libc.
(gcc 3 really needs an option to disallow C99isms; lots of software is
declaring variables after statements these days!)
Index: src/lwp_ucontext.c
===================================================================
RCS file: /coda-src/lwp/src/lwp_ucontext.c,v
retrieving revision 4.1
diff -u -r4.1 lwp_ucontext.c
--- src/lwp_ucontext.c 3 Mar 2005 18:53:51 -0000 4.1
+++ src/lwp_ucontext.c 27 Jun 2005 19:37:32 -0000
@@ -109,6 +109,13 @@
{
va_list ap;
char *stack = ucp->uc_stack.ss_sp;
+
+#ifdef HAVE_SIGALTSTACK
+ struct sigaction action, oldaction;
+ sigset_t sigs, oldsigs;
+ stack_t oldstack;
+#endif
+
assert(stack != NULL);
child = ucp;
@@ -132,9 +139,6 @@
savecontext(_thread, &parent, stack);
#else /* HAVE_SIGALTSTACK */
- struct sigaction action, oldaction;
- sigset_t sigs, oldsigs;
- stack_t oldstack;
action.sa_handler = (void(*)(int))_thread;
action.sa_flags = SA_ONSTACK;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic