Rename struct members sa_siginfo. POSIX reserves identifiers starting

with sa_ when <signal.h> is included. They would conflict with the
upcoming SA_SIGINFO implementation.

Reviewed by:	BDE
This commit is contained in:
cracauer 1999-07-06 06:55:29 +00:00
parent ccff1f5a64
commit 41c6b45683
10 changed files with 99 additions and 99 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux.h,v 1.26 1998/12/30 21:19:59 sos Exp $
* $Id: linux.h,v 1.27 1999/04/29 04:37:56 luoqi Exp $
*/
#ifndef _I386_LINUX_LINUX_H_
@ -50,10 +50,10 @@ typedef int linux_pid_t;
typedef unsigned long linux_sigset_t;
typedef void (*linux_handler_t)(int);
typedef struct {
void (*sa_handler)(int);
linux_sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
void (*lsa_handler)(int);
linux_sigset_t lsa_mask;
unsigned long lsa_flags;
void (*lsa_restorer)(void);
} linux_sigaction_t;
typedef int linux_key_t;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_signal.c,v 1.14 1998/12/21 19:21:36 sos Exp $
* $Id: linux_signal.c,v 1.15 1999/05/06 18:44:26 peter Exp $
*/
#include <sys/param.h>
@ -69,38 +69,38 @@ bsd_to_linux_sigset(sigset_t mask) {
static void
linux_to_bsd_sigaction(linux_sigaction_t *lsa, struct sigaction *bsa)
{
bsa->sa_mask = linux_to_bsd_sigset(lsa->sa_mask);
bsa->sa_handler = lsa->sa_handler;
bsa->sa_mask = linux_to_bsd_sigset(lsa->lsa_mask);
bsa->sa_handler = lsa->lsa_handler;
bsa->sa_flags = 0;
if (lsa->sa_flags & LINUX_SA_NOCLDSTOP)
if (lsa->lsa_flags & LINUX_SA_NOCLDSTOP)
bsa->sa_flags |= SA_NOCLDSTOP;
if (lsa->sa_flags & LINUX_SA_ONSTACK)
if (lsa->lsa_flags & LINUX_SA_ONSTACK)
bsa->sa_flags |= SA_ONSTACK;
if (lsa->sa_flags & LINUX_SA_RESTART)
if (lsa->lsa_flags & LINUX_SA_RESTART)
bsa->sa_flags |= SA_RESTART;
if (lsa->sa_flags & LINUX_SA_ONESHOT)
if (lsa->lsa_flags & LINUX_SA_ONESHOT)
bsa->sa_flags |= SA_RESETHAND;
if (lsa->sa_flags & LINUX_SA_NOMASK)
if (lsa->lsa_flags & LINUX_SA_NOMASK)
bsa->sa_flags |= SA_NODEFER;
}
static void
bsd_to_linux_sigaction(struct sigaction *bsa, linux_sigaction_t *lsa)
{
lsa->sa_handler = bsa->sa_handler;
lsa->sa_restorer = NULL; /* unsupported */
lsa->sa_mask = bsd_to_linux_sigset(bsa->sa_mask);
lsa->sa_flags = 0;
lsa->lsa_handler = bsa->sa_handler;
lsa->lsa_restorer = NULL; /* unsupported */
lsa->lsa_mask = bsd_to_linux_sigset(bsa->sa_mask);
lsa->lsa_flags = 0;
if (bsa->sa_flags & SA_NOCLDSTOP)
lsa->sa_flags |= LINUX_SA_NOCLDSTOP;
lsa->lsa_flags |= LINUX_SA_NOCLDSTOP;
if (bsa->sa_flags & SA_ONSTACK)
lsa->sa_flags |= LINUX_SA_ONSTACK;
lsa->lsa_flags |= LINUX_SA_ONSTACK;
if (bsa->sa_flags & SA_RESTART)
lsa->sa_flags |= LINUX_SA_RESTART;
lsa->lsa_flags |= LINUX_SA_RESTART;
if (bsa->sa_flags & SA_RESETHAND)
lsa->sa_flags |= LINUX_SA_ONESHOT;
lsa->lsa_flags |= LINUX_SA_ONESHOT;
if (bsa->sa_flags & SA_NODEFER)
lsa->sa_flags |= LINUX_SA_NOMASK;
lsa->lsa_flags |= LINUX_SA_NOMASK;
}
int

View File

@ -187,24 +187,24 @@ svr4_to_bsd_sigaction(ssa, bsa)
struct sigaction *bsa;
{
bsa->sa_handler = (sig_t) ssa->sa_handler;
svr4_to_bsd_sigset(&ssa->sa_mask, &bsa->sa_mask);
bsa->sa_handler = (sig_t) ssa->ssa_handler;
svr4_to_bsd_sigset(&ssa->ssa_mask, &bsa->sa_mask);
bsa->sa_flags = 0;
if ((ssa->sa_flags & SVR4_SA_ONSTACK) != 0)
if ((ssa->ssa_flags & SVR4_SA_ONSTACK) != 0)
bsa->sa_flags |= SA_ONSTACK;
if ((ssa->sa_flags & SVR4_SA_RESETHAND) != 0)
if ((ssa->ssa_flags & SVR4_SA_RESETHAND) != 0)
bsa->sa_flags |= SA_RESETHAND;
if ((ssa->sa_flags & SVR4_SA_RESTART) != 0)
if ((ssa->ssa_flags & SVR4_SA_RESTART) != 0)
bsa->sa_flags |= SA_RESTART;
if ((ssa->sa_flags & SVR4_SA_SIGINFO) != 0)
if ((ssa->ssa_flags & SVR4_SA_SIGINFO) != 0)
DPRINTF(("svr4_to_bsd_sigaction: SA_SIGINFO ignored\n"));
if ((ssa->sa_flags & SVR4_SA_NOCLDSTOP) != 0)
if ((ssa->ssa_flags & SVR4_SA_NOCLDSTOP) != 0)
bsa->sa_flags |= SA_NOCLDSTOP;
if ((ssa->sa_flags & SVR4_SA_NODEFER) != 0)
if ((ssa->ssa_flags & SVR4_SA_NODEFER) != 0)
bsa->sa_flags |= SA_NODEFER;
if ((ssa->sa_flags & SVR4_SA_NOCLDWAIT) != 0)
if ((ssa->ssa_flags & SVR4_SA_NOCLDWAIT) != 0)
bsa->sa_flags |= SA_NOCLDWAIT;
if ((ssa->sa_flags & ~SVR4_SA_ALLBITS) != 0)
if ((ssa->ssa_flags & ~SVR4_SA_ALLBITS) != 0)
DPRINTF(("svr4_to_bsd_sigaction: extra bits ignored\n"));
}
@ -214,19 +214,19 @@ bsd_to_svr4_sigaction(bsa, ssa)
struct svr4_sigaction *ssa;
{
ssa->sa_handler = (svr4_sig_t) bsa->sa_handler;
bsd_to_svr4_sigset(&bsa->sa_mask, &ssa->sa_mask);
ssa->sa_flags = 0;
ssa->ssa_handler = (svr4_sig_t) bsa->sa_handler;
bsd_to_svr4_sigset(&bsa->sa_mask, &ssa->ssa_mask);
ssa->ssa_flags = 0;
if ((bsa->sa_flags & SA_ONSTACK) != 0)
ssa->sa_flags |= SVR4_SA_ONSTACK;
ssa->ssa_flags |= SVR4_SA_ONSTACK;
if ((bsa->sa_flags & SA_RESETHAND) != 0)
ssa->sa_flags |= SVR4_SA_RESETHAND;
ssa->ssa_flags |= SVR4_SA_RESETHAND;
if ((bsa->sa_flags & SA_RESTART) != 0)
ssa->sa_flags |= SVR4_SA_RESTART;
ssa->ssa_flags |= SVR4_SA_RESTART;
if ((bsa->sa_flags & SA_NODEFER) != 0)
ssa->sa_flags |= SVR4_SA_NODEFER;
ssa->ssa_flags |= SVR4_SA_NODEFER;
if ((bsa->sa_flags & SA_NOCLDSTOP) != 0)
ssa->sa_flags |= SVR4_SA_NOCLDSTOP;
ssa->ssa_flags |= SVR4_SA_NOCLDSTOP;
}
void

View File

@ -94,10 +94,10 @@ typedef struct {
} svr4_sigset_t;
struct svr4_sigaction {
int sa_flags;
svr4_sig_t sa_handler;
svr4_sigset_t sa_mask;
int sa_reserved[2];
int ssa_flags;
svr4_sig_t ssa_handler;
svr4_sigset_t ssa_mask;
int ssa_reserved[2];
};
struct svr4_sigaltstack {

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ibcs2_signal.c,v 1.11 1997/07/20 09:39:46 bde Exp $
* $Id: ibcs2_signal.c,v 1.12 1997/11/06 19:28:38 phk Exp $
*/
#include <sys/param.h>
@ -165,10 +165,10 @@ ibcs2_to_bsd_sigaction(isa, bsa)
struct sigaction *bsa;
{
bsa->sa_handler = isa->sa_handler;
ibcs2_to_bsd_sigset(&isa->sa_mask, &bsa->sa_mask);
bsa->sa_handler = isa->isa_handler;
ibcs2_to_bsd_sigset(&isa->isa_mask, &bsa->sa_mask);
bsa->sa_flags = 0; /* ??? SA_NODEFER */
if ((isa->sa_flags & IBCS2_SA_NOCLDSTOP) != 0)
if ((isa->isa_flags & IBCS2_SA_NOCLDSTOP) != 0)
bsa->sa_flags |= SA_NOCLDSTOP;
}
@ -178,11 +178,11 @@ bsd_to_ibcs2_sigaction(bsa, isa)
struct ibcs2_sigaction *isa;
{
isa->sa_handler = bsa->sa_handler;
bsd_to_ibcs2_sigset(&bsa->sa_mask, &isa->sa_mask);
isa->sa_flags = 0;
isa->isa_handler = bsa->sa_handler;
bsd_to_ibcs2_sigset(&bsa->sa_mask, &isa->isa_mask);
isa->isa_flags = 0;
if ((bsa->sa_flags & SA_NOCLDSTOP) != 0)
isa->sa_flags |= IBCS2_SA_NOCLDSTOP;
isa->isa_flags |= IBCS2_SA_NOCLDSTOP;
}
int

View File

@ -83,9 +83,9 @@ typedef long ibcs2_sigset_t;
typedef void (*ibcs2_sig_t) __P((int));
struct ibcs2_sigaction {
ibcs2_sig_t sa_handler;
ibcs2_sigset_t sa_mask;
int sa_flags;
ibcs2_sig_t isa_handler;
ibcs2_sigset_t isa_mask;
int isa_flags;
};
#define IBCS2_SIG_DFL ((ibcs2_sig_t)0)

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux.h,v 1.26 1998/12/30 21:19:59 sos Exp $
* $Id: linux.h,v 1.27 1999/04/29 04:37:56 luoqi Exp $
*/
#ifndef _I386_LINUX_LINUX_H_
@ -50,10 +50,10 @@ typedef int linux_pid_t;
typedef unsigned long linux_sigset_t;
typedef void (*linux_handler_t)(int);
typedef struct {
void (*sa_handler)(int);
linux_sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
void (*lsa_handler)(int);
linux_sigset_t lsa_mask;
unsigned long lsa_flags;
void (*lsa_restorer)(void);
} linux_sigaction_t;
typedef int linux_key_t;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_signal.c,v 1.14 1998/12/21 19:21:36 sos Exp $
* $Id: linux_signal.c,v 1.15 1999/05/06 18:44:26 peter Exp $
*/
#include <sys/param.h>
@ -69,38 +69,38 @@ bsd_to_linux_sigset(sigset_t mask) {
static void
linux_to_bsd_sigaction(linux_sigaction_t *lsa, struct sigaction *bsa)
{
bsa->sa_mask = linux_to_bsd_sigset(lsa->sa_mask);
bsa->sa_handler = lsa->sa_handler;
bsa->sa_mask = linux_to_bsd_sigset(lsa->lsa_mask);
bsa->sa_handler = lsa->lsa_handler;
bsa->sa_flags = 0;
if (lsa->sa_flags & LINUX_SA_NOCLDSTOP)
if (lsa->lsa_flags & LINUX_SA_NOCLDSTOP)
bsa->sa_flags |= SA_NOCLDSTOP;
if (lsa->sa_flags & LINUX_SA_ONSTACK)
if (lsa->lsa_flags & LINUX_SA_ONSTACK)
bsa->sa_flags |= SA_ONSTACK;
if (lsa->sa_flags & LINUX_SA_RESTART)
if (lsa->lsa_flags & LINUX_SA_RESTART)
bsa->sa_flags |= SA_RESTART;
if (lsa->sa_flags & LINUX_SA_ONESHOT)
if (lsa->lsa_flags & LINUX_SA_ONESHOT)
bsa->sa_flags |= SA_RESETHAND;
if (lsa->sa_flags & LINUX_SA_NOMASK)
if (lsa->lsa_flags & LINUX_SA_NOMASK)
bsa->sa_flags |= SA_NODEFER;
}
static void
bsd_to_linux_sigaction(struct sigaction *bsa, linux_sigaction_t *lsa)
{
lsa->sa_handler = bsa->sa_handler;
lsa->sa_restorer = NULL; /* unsupported */
lsa->sa_mask = bsd_to_linux_sigset(bsa->sa_mask);
lsa->sa_flags = 0;
lsa->lsa_handler = bsa->sa_handler;
lsa->lsa_restorer = NULL; /* unsupported */
lsa->lsa_mask = bsd_to_linux_sigset(bsa->sa_mask);
lsa->lsa_flags = 0;
if (bsa->sa_flags & SA_NOCLDSTOP)
lsa->sa_flags |= LINUX_SA_NOCLDSTOP;
lsa->lsa_flags |= LINUX_SA_NOCLDSTOP;
if (bsa->sa_flags & SA_ONSTACK)
lsa->sa_flags |= LINUX_SA_ONSTACK;
lsa->lsa_flags |= LINUX_SA_ONSTACK;
if (bsa->sa_flags & SA_RESTART)
lsa->sa_flags |= LINUX_SA_RESTART;
lsa->lsa_flags |= LINUX_SA_RESTART;
if (bsa->sa_flags & SA_RESETHAND)
lsa->sa_flags |= LINUX_SA_ONESHOT;
lsa->lsa_flags |= LINUX_SA_ONESHOT;
if (bsa->sa_flags & SA_NODEFER)
lsa->sa_flags |= LINUX_SA_NOMASK;
lsa->lsa_flags |= LINUX_SA_NOMASK;
}
int

View File

@ -187,24 +187,24 @@ svr4_to_bsd_sigaction(ssa, bsa)
struct sigaction *bsa;
{
bsa->sa_handler = (sig_t) ssa->sa_handler;
svr4_to_bsd_sigset(&ssa->sa_mask, &bsa->sa_mask);
bsa->sa_handler = (sig_t) ssa->ssa_handler;
svr4_to_bsd_sigset(&ssa->ssa_mask, &bsa->sa_mask);
bsa->sa_flags = 0;
if ((ssa->sa_flags & SVR4_SA_ONSTACK) != 0)
if ((ssa->ssa_flags & SVR4_SA_ONSTACK) != 0)
bsa->sa_flags |= SA_ONSTACK;
if ((ssa->sa_flags & SVR4_SA_RESETHAND) != 0)
if ((ssa->ssa_flags & SVR4_SA_RESETHAND) != 0)
bsa->sa_flags |= SA_RESETHAND;
if ((ssa->sa_flags & SVR4_SA_RESTART) != 0)
if ((ssa->ssa_flags & SVR4_SA_RESTART) != 0)
bsa->sa_flags |= SA_RESTART;
if ((ssa->sa_flags & SVR4_SA_SIGINFO) != 0)
if ((ssa->ssa_flags & SVR4_SA_SIGINFO) != 0)
DPRINTF(("svr4_to_bsd_sigaction: SA_SIGINFO ignored\n"));
if ((ssa->sa_flags & SVR4_SA_NOCLDSTOP) != 0)
if ((ssa->ssa_flags & SVR4_SA_NOCLDSTOP) != 0)
bsa->sa_flags |= SA_NOCLDSTOP;
if ((ssa->sa_flags & SVR4_SA_NODEFER) != 0)
if ((ssa->ssa_flags & SVR4_SA_NODEFER) != 0)
bsa->sa_flags |= SA_NODEFER;
if ((ssa->sa_flags & SVR4_SA_NOCLDWAIT) != 0)
if ((ssa->ssa_flags & SVR4_SA_NOCLDWAIT) != 0)
bsa->sa_flags |= SA_NOCLDWAIT;
if ((ssa->sa_flags & ~SVR4_SA_ALLBITS) != 0)
if ((ssa->ssa_flags & ~SVR4_SA_ALLBITS) != 0)
DPRINTF(("svr4_to_bsd_sigaction: extra bits ignored\n"));
}
@ -214,19 +214,19 @@ bsd_to_svr4_sigaction(bsa, ssa)
struct svr4_sigaction *ssa;
{
ssa->sa_handler = (svr4_sig_t) bsa->sa_handler;
bsd_to_svr4_sigset(&bsa->sa_mask, &ssa->sa_mask);
ssa->sa_flags = 0;
ssa->ssa_handler = (svr4_sig_t) bsa->sa_handler;
bsd_to_svr4_sigset(&bsa->sa_mask, &ssa->ssa_mask);
ssa->ssa_flags = 0;
if ((bsa->sa_flags & SA_ONSTACK) != 0)
ssa->sa_flags |= SVR4_SA_ONSTACK;
ssa->ssa_flags |= SVR4_SA_ONSTACK;
if ((bsa->sa_flags & SA_RESETHAND) != 0)
ssa->sa_flags |= SVR4_SA_RESETHAND;
ssa->ssa_flags |= SVR4_SA_RESETHAND;
if ((bsa->sa_flags & SA_RESTART) != 0)
ssa->sa_flags |= SVR4_SA_RESTART;
ssa->ssa_flags |= SVR4_SA_RESTART;
if ((bsa->sa_flags & SA_NODEFER) != 0)
ssa->sa_flags |= SVR4_SA_NODEFER;
ssa->ssa_flags |= SVR4_SA_NODEFER;
if ((bsa->sa_flags & SA_NOCLDSTOP) != 0)
ssa->sa_flags |= SVR4_SA_NOCLDSTOP;
ssa->ssa_flags |= SVR4_SA_NOCLDSTOP;
}
void

View File

@ -94,10 +94,10 @@ typedef struct {
} svr4_sigset_t;
struct svr4_sigaction {
int sa_flags;
svr4_sig_t sa_handler;
svr4_sigset_t sa_mask;
int sa_reserved[2];
int ssa_flags;
svr4_sig_t ssa_handler;
svr4_sigset_t ssa_mask;
int ssa_reserved[2];
};
struct svr4_sigaltstack {