public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Missing proto for sigaction() in <sys/signal.h>
@ 1997-03-25 20:52 Mumit Khan
  1997-03-25 23:17 ` Jim Balter
  0 siblings, 1 reply; 5+ messages in thread
From: Mumit Khan @ 1997-03-25 20:52 UTC (permalink / raw)
  To: gnu-win32

I don't have a POSIX spec handy, but I believe that sys/signal.h
should have the prototype for sigaction(). It's already defined
in winsup/signal.cc, so no harm done even if I'm wrong.

Here's a trivial patch for newlib/libc/include/sys/signal.h:

*** signal.h.~1	Tue Mar 25 22:32:25 1997
- --- signal.h	Tue Mar 25 22:36:57 1997
*************** struct sigaction 
*** 25,28 ****
- --- 25,30 ----
  #define sigemptyset(what)   (*(what) = 0)
  
+ int sigaction (int __sig, struct sigaction *__act,
+     struct sigaction *__oldact);
  int sigprocmask (int how, const sigset_t *a, sigset_t *b);
  #endif /* _STRICT_ANSI */


Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Missing proto for sigaction() in <sys/signal.h>
  1997-03-25 20:52 Missing proto for sigaction() in <sys/signal.h> Mumit Khan
@ 1997-03-25 23:17 ` Jim Balter
  1997-03-27 20:59   ` Mumit Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Balter @ 1997-03-25 23:17 UTC (permalink / raw)
  To: Mumit Khan; +Cc: gnu-win32

Mumit Khan wrote:
> 
> I don't have a POSIX spec handy, but I believe that sys/signal.h
> should have the prototype for sigaction().

[<signal.h> actually; POSIX doesn't mandate <sys/sygnal.h>]

Aside from sigaction, the following symbols mandated by POSIX are
missing from signal.h:

SIGCONT
kill
sigdelset
sigfillset
sigismember
sigpending
sigsuspend


More grist for the convert-to-glibc mill.

--
<J Q B>
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Missing proto for sigaction() in <sys/signal.h>
  1997-03-25 23:17 ` Jim Balter
@ 1997-03-27 20:59   ` Mumit Khan
  1997-03-28  9:25     ` Jim Balter
  0 siblings, 1 reply; 5+ messages in thread
From: Mumit Khan @ 1997-03-27 20:59 UTC (permalink / raw)
  To: Jim Balter; +Cc: gnu-win32

Jim Balter <jqb@netcom.com> writes:
> 
> [<signal.h> actually; POSIX doesn't mandate <sys/sygnal.h>]
> 
> Aside from sigaction, the following symbols mandated by POSIX are
> missing from signal.h:
> 
> SIGCONT

Hmmm ... there in my copy. My CVS repo is trashed, so hard to tell if
I added it or not.

> kill
> sigdelset
> sigfillset
> sigismember

Here's the trivial patch:

*** newlib/libc/include/sys/signal.h.~1 Tue Mar 25 22:32:25 1997
--- newlib/libc/include/sys/signal.h    Thu Mar 27 22:57:41 1997
*************** struct sigaction 
*** 25,29 ****
  #define sigemptyset(what)   (*(what) = 0)
  
! int sigprocmask (int how, const sigset_t *a, sigset_t *b);
  #endif /* _STRICT_ANSI */
  
--- 25,39 ----
  #define sigemptyset(what)   (*(what) = 0)
  
! /* From winsup/winsup.h */
! int _EXFUN(sigdelset, (sigset_t *set, const int sig));
! int _EXFUN(sigfillset, (sigset_t * set));
! int _EXFUN(sigismember, (const sigset_t *set, int sig));
! 
! int _EXFUN(sigaction, (int signum,
!              const struct sigaction *newaction,
!              struct sigaction *oldaction));
! int _EXFUN (sigprocmask, (int how, const sigset_t *a, sigset_t *b));
! 
! int _EXFUN(kill, (pid_t pid, int sig));
  #endif /* _STRICT_ANSI */
  

> sigpending
> sigsuspend

Anybody out there with a robust implementation of sigpending and
sigsuspend for gnu-win32 out there?

Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Missing proto for sigaction() in <sys/signal.h>
  1997-03-28  9:25     ` Jim Balter
@ 1997-03-28  9:25       ` Jim Balter
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Balter @ 1997-03-28  9:25 UTC (permalink / raw)
  To: Mumit Khan, gnu-win32

Jim Balter wrote:
> 
> Mumit Khan wrote:
> >
> > Jim Balter <jqb@netcom.com> writes:
> > >
> > > [<signal.h> actually; POSIX doesn't mandate <sys/sygnal.h>]
> > >
> > > Aside from sigaction, the following symbols mandated by POSIX are
> > > missing from signal.h:
> > >
> > > SIGCONT


> *with the POSIX standard in my hand*

Well, I had it in hand, but I was reading the wrong section.
As I should be sensitive to from my time on the ANSI C committee,
appendices are not part of the standard, so the section that lists
the contents of signal.h is not a mandate.  In fact, it is not necessary
to define SIGCONT (or the other job control signals: SIGSTOP, SIGTSTP,
SIGTTIN, SIGTTOU) on systems that don't support job control.

--
<J Q B>
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Missing proto for sigaction() in <sys/signal.h>
  1997-03-27 20:59   ` Mumit Khan
@ 1997-03-28  9:25     ` Jim Balter
  1997-03-28  9:25       ` Jim Balter
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Balter @ 1997-03-28  9:25 UTC (permalink / raw)
  To: Mumit Khan; +Cc: gnu-win32

Mumit Khan wrote:
> 
> Jim Balter <jqb@netcom.com> writes:
> >
> > [<signal.h> actually; POSIX doesn't mandate <sys/sygnal.h>]
> >
> > Aside from sigaction, the following symbols mandated by POSIX are
> > missing from signal.h:
> >
> > SIGCONT
> 
> Hmmm ... there in my copy. My CVS repo is trashed, so hard to tell if
> I added it or not.

It's defined twice in sys/signal.h, but in both cases ifdefed
out by _WIN32.  Of course there is no job control in gnu-win32,
but that should be indicated by sysconf (which in cygwin returns the
wrong value for _SC_JOB_CONTROL and is misimplemented in general;
someone asked me if I had any other reason
not to post my bugs and patches -- yes, there are too many to keep
track of, and rather than write patches I am writing my own library,
*with the POSIX standard in my hand*, something that the original
author should have done).

--
<J Q B>
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-03-28  9:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-25 20:52 Missing proto for sigaction() in <sys/signal.h> Mumit Khan
1997-03-25 23:17 ` Jim Balter
1997-03-27 20:59   ` Mumit Khan
1997-03-28  9:25     ` Jim Balter
1997-03-28  9:25       ` Jim Balter

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 read-only IMAP folder(s) and NNTP newsgroup(s).