Patch to fix defined but undeclared sigrelse() function.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch to fix defined but undeclared sigrelse() function.

Scott Finneran
Hello,

Below is a single line patch to fix what I assume is an issue with
sigrelse(). The function is correctly defined in
winsup/src/cygwin/exceptions.cc. However, the function is not declared
in signal.h.

Of course I don't know the history of support for this function within
cygwin other than the fact that it was added recently. As such, I am
assuming that this missing declaration is indeed a bug and not a way of
preventing people from using the function at this time.

Any feedback would be appreciated.

Kind Regards,

Scott

Index: cygwin/include/cygwin/signal.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/signal.h,v
retrieving revision 1.7
diff -u -p -r1.7 signal.h
--- cygwin/include/cygwin/signal.h 28 Sep 2005 22:56:47 -0000 1.7
+++ cygwin/include/cygwin/signal.h 10 Nov 2005 03:13:44 -0000
@@ -222,6 +222,7 @@ struct sigaction
  int sigwait (const sigset_t *, int *);
  int sigwaitinfo (const sigset_t *, siginfo_t *);
  int sighold (int);
+int sigrelse (int);
  int sigqueue(pid_t, int, const union sigval);
  int siginterrupt (int, int);
  #ifdef __cplusplus

--
Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
http://www.mailguard.com.au/mg


Reply | Threaded
Open this post in threaded view
|

Re: Patch to fix defined but undeclared sigrelse() function.

Corinna Vinschen-2
On Nov 10 14:26, Scott Finneran wrote:

> Hello,
>
> Below is a single line patch to fix what I assume is an issue with
> sigrelse(). The function is correctly defined in
> winsup/src/cygwin/exceptions.cc. However, the function is not declared
> in signal.h.
>
> Of course I don't know the history of support for this function within
> cygwin other than the fact that it was added recently. As such, I am
> assuming that this missing declaration is indeed a bug and not a way of
> preventing people from using the function at this time.
>
> Any feedback would be appreciated.

You're right, sigrelse is defined and exported from the DLL, just the
prototype is missing.  What's missing is just a ChangeLog entry, but
for this simple case, I added one myself:

        * include/cygwin/signal.h: Add missing sigrelse prototype.

> Index: cygwin/include/cygwin/signal.h
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/signal.h,v
> retrieving revision 1.7
> diff -u -p -r1.7 signal.h
> --- cygwin/include/cygwin/signal.h 28 Sep 2005 22:56:47 -0000 1.7
> +++ cygwin/include/cygwin/signal.h 10 Nov 2005 03:13:44 -0000
> @@ -222,6 +222,7 @@ struct sigaction
>  int sigwait (const sigset_t *, int *);
>  int sigwaitinfo (const sigset_t *, siginfo_t *);
>  int sighold (int);
> +int sigrelse (int);
>  int sigqueue(pid_t, int, const union sigval);
>  int siginterrupt (int, int);
>  #ifdef __cplusplus


Thanks,
Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.