Adapt to new signal changes (from Jason)

This commit is contained in:
christos 1998-09-26 23:53:36 +00:00
parent cdfcc0bd0b
commit 1ebb9bf289
6 changed files with 186 additions and 23 deletions

View File

@ -0,0 +1,24 @@
/* $NetBSD: Lint___setjmp14.c,v 1.1 1998/09/26 23:53:36 christos Exp $ */
/*
* This file placed in the public domain.
* Chris Demetriou, November 5, 1997.
*/
#include <setjmp.h>
/*ARGSUSED*/
int
__setjmp14(env)
jmp_buf env;
{
return (0);
}
/*ARGSUSED*/
void
__longjmp14(env, val)
jmp_buf env;
int val;
{
}

View File

@ -0,0 +1,25 @@
/* $NetBSD: Lint___sigsetjmp14.c,v 1.1 1998/09/26 23:53:36 christos Exp $ */
/*
* This file placed in the public domain.
* Chris Demetriou, November 5, 1997.
*/
#include <setjmp.h>
/*ARGSUSED*/
int
__sigsetjmp14(env, savemask)
sigjmp_buf env;
int savemask;
{
return (0);
}
/*ARGSUSED*/
void
__siglongjmp14(env, val)
sigjmp_buf env;
int val;
{
}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.92 1998/07/28 19:58:25 mycroft Exp $
# $NetBSD: Makefile.inc,v 1.93 1998/09/26 23:53:36 christos Exp $
# from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95
# gen sources
@ -18,11 +18,11 @@ SRCS+= _errno.c alarm.c assert.c basename.c clock.c closedir.c \
pause.c popen.c psignal.c pwcache.c pw_scan.c raise.c readdir.c \
rewinddir.c scandir.c seekdir.c setdomainname.c \
sethostname.c setjmperr.c setmode.c setproctitle.c \
siginterrupt.c siglist.c signal.c signame.c sigsetops.c \
sleep.c stringlist.c sysconf.c sysctl.c syslog.c telldir.c \
time.c times.c timezone.c tolower_.c ttyname.c ttyslot.c \
toupper_.c ualarm.c uname.c unvis.c usleep.c utime.c \
valloc.c vis.c wait.c wait3.c waitpid.c warn.c warnx.c \
siginterrupt.c siglist.c signal.c \
signame.c __sigsetops14.c sigsetops.c sleep.c stringlist.c sysconf.c \
sysctl.c syslog.c telldir.c time.c times.c timezone.c tolower_.c \
ttyname.c ttyslot.c toupper_.c ualarm.c uname.c unvis.c usleep.c \
utime.c valloc.c vis.c wait.c wait3.c waitpid.c warn.c warnx.c \
vwarn.c vwarnx.c verr.c verrx.c
# indirect reference stubs, to be removed soon.

View File

@ -0,0 +1,112 @@
/* $NetBSD: __sigsetops14.c,v 1.1 1998/09/26 23:53:36 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)sigsetops.c 8.1 (Berkeley) 6/4/93
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)sigsetops.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: __sigsetops14.c,v 1.1 1998/09/26 23:53:36 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
#define __LIBC12_SOURCE__
#include <errno.h>
#include <signal.h>
#undef sigemptyset
#undef sigfillset
#undef sigaddset
#undef sigdelset
#undef sigismember
int
__sigemptyset14(set)
sigset_t *set;
{
__sigemptyset(set);
return (0);
}
int
__sigfillset14(set)
sigset_t *set;
{
__sigfillset(set);
return (0);
}
int
__sigaddset14(set, signo)
sigset_t *set;
int signo;
{
if (signo <= 0 || signo >= NSIG) {
errno = EINVAL;
return -1;
}
__sigaddset(set, signo);
return (0);
}
int
__sigdelset14(set, signo)
sigset_t *set;
int signo;
{
if (signo <= 0 || signo >= NSIG) {
errno = EINVAL;
return -1;
}
__sigdelset(set, signo);
return (0);
}
int
__sigismember14(set, signo)
const sigset_t *set;
int signo;
{
if (signo <= 0 || signo >= NSIG) {
errno = EINVAL;
return -1;
}
return (__sigismember(set, signo));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: siglist.c,v 1.9 1997/07/13 19:46:16 christos Exp $ */
/* $NetBSD: siglist.c,v 1.10 1998/09/26 23:53:36 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@ -38,14 +38,14 @@
#if 0
static char sccsid[] = "@(#)siglist.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: siglist.c,v 1.9 1997/07/13 19:46:16 christos Exp $");
__RCSID("$NetBSD: siglist.c,v 1.10 1998/09/26 23:53:36 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
#include <signal.h>
const char *const _sys_siglist[NSIG] = {
const char *const _sys_siglist[SIGUSR2+1] = {
"Signal 0",
"Hangup", /* SIGHUP */
"Interrupt", /* SIGINT */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sigsetops.c,v 1.11 1997/07/13 19:46:19 christos Exp $ */
/* $NetBSD: sigsetops.c,v 1.12 1998/09/26 23:53:36 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -40,10 +40,12 @@
#if 0
static char sccsid[] = "@(#)sigsetops.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: sigsetops.c,v 1.11 1997/07/13 19:46:19 christos Exp $");
__RCSID("$NetBSD: sigsetops.c,v 1.12 1998/09/26 23:53:36 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
#define __LIBC12_SOURCE__
#include <errno.h>
#include <signal.h>
@ -55,7 +57,7 @@ __RCSID("$NetBSD: sigsetops.c,v 1.11 1997/07/13 19:46:19 christos Exp $");
int
sigemptyset(set)
sigset_t *set;
sigset13_t *set;
{
*set = 0;
return (0);
@ -63,46 +65,46 @@ sigemptyset(set)
int
sigfillset(set)
sigset_t *set;
sigset13_t *set;
{
*set = ~(sigset_t)0;
*set = ~(sigset13_t)0;
return (0);
}
int
sigaddset(set, signo)
sigset_t *set;
sigset13_t *set;
int signo;
{
if (signo <= 0 || signo >= NSIG) {
if (signo <= 0 || signo >= NSIG13) {
errno = EINVAL;
return -1;
}
*set |= sigmask(signo);
*set |= __sigmask13(signo);
return (0);
}
int
sigdelset(set, signo)
sigset_t *set;
sigset13_t *set;
int signo;
{
if (signo <= 0 || signo >= NSIG) {
if (signo <= 0 || signo >= NSIG13) {
errno = EINVAL;
return -1;
}
*set &= ~sigmask(signo);
*set &= ~__sigmask13(signo);
return (0);
}
int
sigismember(set, signo)
const sigset_t *set;
const sigset13_t *set;
int signo;
{
if (signo <= 0 || signo >= NSIG) {
if (signo <= 0 || signo >= NSIG13) {
errno = EINVAL;
return -1;
}
return ((*set & sigmask(signo)) != 0);
return ((*set & __sigmask13(signo)) != 0);
}