zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: signames problem
Date: Wed, 24 Feb 1999 16:01:23 +0100	[thread overview]
Message-ID: <9902241501.AA23279@ibmth.df.unipi.it> (raw)
In-Reply-To: "Bernd Eggink"'s message of "Wed, 24 Feb 1999 15:41:44 NFT." <36D40FA8.8679495C@uni-hamburg.de>

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@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


      reply	other threads:[~1999-02-28 21:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-24 11:37 Bernd Eggink
1999-02-24 13:00 ` Peter Stephenson
1999-02-24 14:41   ` Bernd Eggink
1999-02-24 15:01     ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9902241501.AA23279@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).