[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13026: Assume POSIX 1003.1-1988 or later for signal.h.
From: |
Eli Zaretskii |
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@cs.ucla.edu>
> CC: 13026@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.