From 5abc2c37cee99a1ebc719fe113b4786122666bf6 Mon Sep 17 00:00:00 2001 From: kleink Date: Wed, 26 Nov 1997 16:51:12 +0000 Subject: [PATCH] Update sigaltstack() to use stack_t parameters. --- include/signal.h | 4 ++-- lib/libc/sys/sigaltstack.2 | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/signal.h b/include/signal.h index 935c0278b9c5..44baa4c60087 100644 --- a/include/signal.h +++ b/include/signal.h @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.9 1997/11/18 20:30:24 kleink Exp $ */ +/* $NetBSD: signal.h,v 1.10 1997/11/26 16:51:13 kleink Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -111,7 +111,7 @@ int sigpause __P((int)); int sigreturn __P((struct sigcontext *)); int sigsetmask __P((int)); int sigstack __P((const struct sigstack *, struct sigstack *)); -int sigaltstack __P((const struct sigaltstack *, struct sigaltstack *)); +int sigaltstack __P((const stack_t *, stack_t *)); int sigvec __P((int, struct sigvec *, struct sigvec *)); void psignal __P((unsigned int, const char *)); #endif /* !_POSIX_SOURCE */ diff --git a/lib/libc/sys/sigaltstack.2 b/lib/libc/sys/sigaltstack.2 index 7e182eb1e0c2..aaacbe4a21a9 100644 --- a/lib/libc/sys/sigaltstack.2 +++ b/lib/libc/sys/sigaltstack.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: sigaltstack.2,v 1.5 1997/09/20 02:49:43 mikel Exp $ +.\" $NetBSD: sigaltstack.2,v 1.6 1997/11/26 16:51:12 kleink Exp $ .\" .\" Copyright (c) 1983, 1991, 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -40,18 +40,17 @@ .Nm sigaltstack .Nd set and/or get signal stack context .Sh SYNOPSIS -.Fd #include .Fd #include .Pp .Bd -literal -struct sigaltstack { - char *ss_sp; - int ss_size; +typedef struct { + void *ss_sp; + size_t ss_size; int ss_flags; -}; +} stack_t; .Ed .Ft int -.Fn sigaltstack "const struct sigaltstack *ss" "struct sigaltstack *oss" +.Fn sigaltstack "const stack_t *ss" "stack_t *oss" .Sh DESCRIPTION .Fn Sigaltstack allows users to define an alternative stack on which signals @@ -160,6 +159,11 @@ Size of alternative stack area is less than or equal to .Sh SEE ALSO .Xr sigaction 2 , .Xr setjmp 3 +.Sh STANDARDS +The +.Fn sigaltstack +function conforms to +.St -xpg4.2 . .Sh HISTORY The predecessor to .Nm sigaltstack ,