Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: signames problem
- X-seq: zsh-workers 5557
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: signames problem
- Date: Wed, 24 Feb 1999 16:01:23 +0100
- In-reply-to: "Bernd Eggink"'s message of "Wed, 24 Feb 1999 15:41:44 NFT." <36D40FA8.8679495C@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bernd Eggink wrote:
> 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.
Thanks. Here's what I came up with based on your suggestion. Maybe it's
even safer to check for signals we know should be defined, i.e. look for
SIGHUP or SIGKILL, but goodness knows what's out there these days.
--- configure.in.sig Wed Feb 24 13:46:04 1999
+++ configure.in Wed Feb 24 15:52:13 1999
@@ -682,6 +682,7 @@
dnl In case we don't get the stuff from the preprocesor, use the old
dnl list of standard places.
sigfile_list="/usr/include/bsd/sys/signal.h
+/usr/include/signum.h
/usr/include/asm/signum.h
/usr/include/asm/signal.h
/usr/include/linux/signal.h
@@ -690,9 +691,13 @@
fi
for SIGNAL_H in $sigfile_list
do
- test -f $SIGNAL_H && \
- grep '#[ ]*define[ ][ ]*SIG[0-9A-Z]*[ ]*[0-9][0-9]*' $SIGNAL_H > /dev/null && \
- break
+ dnl Try to make sure it doesn't get confused by files that don't
+ dnl have real signal definitions in, but do #define SIG* by counting
+ dnl the number of signals. Maybe we could even check for e.g. SIGHUP?
+ nsigs=`test -f $SIGNAL_H && \
+ grep '#[ ]*define[ ][ ]*SIG[0-9A-Z]*[ ]*[0-9][0-9]*' $SIGNAL_H | \
+ wc -l | sed 's/[ ]//g'`
+ test "x$nsigs" != x && test "$nsigs" -ge 7 && break
done
zsh_cv_path_signal_h=$SIGNAL_H
])
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author