GNU bug report logs - #13026
Assume POSIX 1003.1-1988 or later for signal.h.

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Thu, 29 Nov 2012 06:55:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 13026 <at> debbugs.gnu.org
Subject: bug#13026: Assume POSIX 1003.1-1988 or later for signal.h.
Date: Fri, 30 Nov 2012 10:54:11 +0200
> Date: Thu, 29 Nov 2012 13:38:04 -0800
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> CC: 13026 <at> debbugs.gnu.org
> 
> > This will break the Windows build in more than one way, unless
> > accompanied by suitable Windows-only changes.  Is this the entire
> > changeset, or did you omit some more changes?
> 
> That was the entire changeset.  I didn't know about the problems
> on MS-Windows.  I trimmed down the patch, to avoid the issues you
> raised, and am attaching a proposed revised patch.  Thanks for
> the review.

Thanks, this looks fine, except for this part:

> @@ -5992,8 +5978,6 @@
>        if (!strncmp (name, "SIG", 3) || !strncmp (name, "sig", 3))
>  	name += 3;
>  
> -      if (0)
> -	;
>  #ifdef SIGUSR1
>        parse_signal ("usr1", SIGUSR1);
>  #endif

The expansion of parse_signal starts with "else if", so it looks like
removing that ugly "if (0)" will break something like

  M-: (signal-process 'SIGINT) RET

because the unrelated 'if' before it will then be used to do nothing
useful with such signal specs.  Maybe a better fix there would be to
have an array of data (name and value of each signal), and loop
through it, instead of using if-elseif.

By the way, an alternative way of dealing with the lack of Posix
signals on Windows is to condition the related fragments on WINDOWSNT,
and remove the "#ifdef SIGFOO" conditions for Posix signals.  That
would tell more clearly why the code is being excluded, I think.




This bug report was last modified 12 years and 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.