[uClibc]setjmp() & setsigjmp()
Tom Walsh
tom at cyberiansoftware.com
Sun May 6 18:01:05 UTC 2001
David McCullough wrote:
>
>
> >From what I can see, the current uClibc sources already have a sigsetjmp
> for m68k, you do need to include the proper headers though as it is a macro.
>
Okay, I see it now, it is in
/usr/local/m68k-elf/sys-includes/bits/setjmp.h. I guess this goes down
to my (mis)understanding of writing C under gcc.. Admittedly, macros
are my weakest point with C, I have been able to successfully avoid
their use in 20+ years of coding. This illustrates my problem with
__sigsetjmp:
=======================================
// test.c
#include <signal.h>
#include <setjmp.h>
sigjmp_buf sendabort;
int
main(volatile int argc, char **volatile argv)
{
sigsetjmp(sendabort, 1);
return 0;
}
=======================================
compiling test.c with:
=======================================
m68k-elf-gcc -m68000 -O2 -fomit-frame-pointer -o test test.c
-Wl,-elf2flt -lc
=======================================
Errors out with:
=======================================
test.c: In function `main':
test.c:9: warning: passing arg 1 of `__sigsetjmp' from incompatible
pointer type
test.elf2flt: In function `main':
test.elf2flt(.text+0x44): undefined reference to `__sigsetjmp'
collect2: ld returned 1 exit status
=======================================
The snippet in test.c is taken from the userland ftp sources, I was
attempting to get ftp working..
What am I doing wrong here with the passing of sendabort to the macro?
Any ideas?
TIA,
TomW
--
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
More information about the uClibc
mailing list