From: Daniel B. <da...@te...> - 2003-08-25 01:30:10
|
Between gnu libc 2.3.1 and 2.3.2, there was a change in the type of the uc_mcontext member of the struct ucontext that signal handlers get passed as third argument. This causes sbcl CVS to not compile on debian unstable systems. The appended patch updates for the new names, at the cost of breaking on the old ones (so don't apply it unless you've already determined that things are broken). Short of #ifdefs I don't see an obvious way of writing code that will work on both, and to compound the not-too-impressed-today feeling I can't find any sensible #define in glibc to distinguish one version from the next either, so it might even have to be hand-tweaked or detected at grovel time. I'm not going to start messing around witht he build process less than 24 hours before a release, so there it is. I have sent mail to bug-glibc (significantly more temperate mail than I wanted to send, too) but I'm not expecting miracles.=20=20 Index: src/runtime/ppc-linux-os.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/sbcl/sbcl/src/runtime/ppc-linux-os.c,v retrieving revision 1.9 diff -u -r1.9 ppc-linux-os.c =2D-- src/runtime/ppc-linux-os.c 1 Aug 2003 17:16:56 -0000 1.9 +++ src/runtime/ppc-linux-os.c 23 Aug 2003 21:09:17 -0000 @@ -51,19 +51,19 @@ os_context_register_t * os_context_register_addr(os_context_t *context, int offset) { =2D return &((context->uc_mcontext.regs)->gpr[offset]); + return &((context->uc_mcontext.gregs)[offset]); } =20 os_context_register_t * os_context_pc_addr(os_context_t *context) { =2D return &((context->uc_mcontext.regs)->nip); + return &((context->uc_mcontext.gregs)[PT_NIP]); } =20 os_context_register_t * os_context_lr_addr(os_context_t *context) { =2D return &((context->uc_mcontext.regs)->link); + return &((context->uc_mcontext.gregs)[PT_LNK]); } =20 sigset_t * @@ -80,7 +80,7 @@ registers, and PT_FPSCR is an offset that is larger than 32 (the number of ppc registers), but that happens to get the right answer. -- CSR, 2002-07-11 */ =2D return context->uc_mcontext.regs->gpr[PT_FPSCR];=20 + return context->uc_mcontext.gregs[PT_FPSCR];=20 } =20 void=20 =2Ddan =2D-=20 http://www.cliki.net/ - Link farm for free CL-on-Unix resources=20 |