sigaction
Roger Oberholtzer
roger at opq.se
Wed Mar 25 00:44:53 PDT 2009
On Tue, 2009-03-24 at 20:20 +0000, Jorge Almeida wrote:
> In case someone is used to sigaction(2) in linux, on a PIV:
>
> $ make
> diet gcc -Os -march=pentium4 -pipe -fomit-frame-pointer -Wall -o rdfromfile -I /opt/libowfat/include rdfromfile.c /opt/libowfat/lib/libowfat.a
> rdfromfile.c:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
> rdfromfile.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
> rdfromfile.c:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
> make: *** [rdfromfile] Error 1
>
> (Never mind the "diet" stuff, I tried with glibc and it's the same.)
>
> 1 #include <unistd.h>
> 2 #include <signal.h>
> 3 #include <sys/types.h>
> 4 #include <sys/wait.h>
> 5 #include <stdlib.h>
> 6 #include <errno.h>
> 7 #include <buffer.h>
> 8 #include <open.h>
> 9 #define STDERR buffer_2
> 10 void err3msg(char *msg1, char *msg2, char *msg3);
> 11 void errmsg(char *msg);
> 12 pid_t cpid;
> 13 void forwardsignal(int signum);
> 14 struct sigaction frwdsigs;
> 15 frwdsigs.sa_handler=forwardsignal;
> 16 frwdsigs.sa_mask=0;
> 17 frwdsigs.sa_flags=0;
This code looks like code I use, without the error. Just for fun, try
removing the -Os and -fomit-frame-pointer options. I do not use those,
so maybe it is there.
OOC, why are you specifying the -march=pentium4 option? I would try
without that as well. Just to see if the compiler is happy.
What gcc version are you using?
--
Roger Oberholtzer
OPQ Systems / Ramböll RST
Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden
Office: Int +46 8-615 60 20
Mobile: Int +46 70-815 1696
More information about the Linux-users
mailing list