Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: signames problem
- X-seq: zsh-workers 5510
- From: Bernd Eggink <eggink@xxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- Subject: Re: signames problem
- Date: Wed, 24 Feb 1999 15:41:44 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Organization: RRZ Uni Hamburg
- References: <9902241301.AA16501@xxxxxxxxxxxxxxxxx>
- Sender: rz2a022@xxxxxxxxxxxxxx
Peter Stephenson wrote:
>
> > In SuSE Linux 6.0, zsh-3.1.5-pws-9 doesn't know any signames.
> >
> > Possibly because the former /usr/include/asm/signal.h has moved to
> > /usr/include/signum.h !?
>
> configure has changed so it's now supposed to work it out from the files
> that `#include <signal.h>' actually includes. Anything with `sig' in it is
> tested. Is zsh_cv_path_signal_h set to /dev/null in config.cache? What
> does the new code (I've replaced $CPP with gcc -E, $AWK with awk assuming
> that's what's used):
>
> echo "#include <signal.h>" > nametmp.c
> sigfile_list="`gcc -E nametmp.c |
> sed -n 's/^#[ ].*\"\(.*\)\"/\1/p' |
> sed 's/\\\\\\\\/\//g' |
> awk '{ if (\$1 ~ \"sig\") files[\$1] = \$1 }
> END { for (var in files) print var }'`"
>
> produce for $sigfile_list? (There's a space and a tab in the empty [ ]
> which does funny things if you paste it into zsh.)
The result is
/usr/include/sigstack.h
... 5 more files ...
/usr/include/signum.h
which is OK so far, but unfortunately /usr/include/sigstack.h contains a
line
#define SIGSTKSZ 8192
which causes configure to take /usr/include/sigstack.h as the result.
The test in configure:4024 is too weak. I guess it would be better to
test for a minimum number (e.g., 7) of "#define SIG..."s in each file.
This works for me:
for SIGNAL_H in $sigfile_list
do
n=0
test -f $SIGNAL_H && \
grep '#[ ]*define[ ][ ]*SIG[0-9A-Z]*[ ]*[0-9][0-9]*'
$SIGNAL_H | \
wc -l | read n dummy && [ $n -ge 7 ] && break
done
Regards,
Bernd
--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@xxxxxxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author