save errno while trying to install a !SA_SIGINFO trampoline -- this

is expected to fail with !COMPAT_16 kernels, and we shouldn't
overwrite errno in this case
This commit is contained in:
drochner 2004-03-23 16:19:40 +00:00
parent d82ce85d20
commit cd85223ee2
13 changed files with 39 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2003/10/18 18:33:51 christos Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.5 2004/03/23 16:19:40 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -64,10 +64,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.3 2003/10/05 19:48:39 matt Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2004/03/23 16:19:40 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -64,10 +64,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.7 2003/10/12 04:23:17 christos Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.8 2004/03/23 16:19:40 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -64,10 +64,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2003/10/18 18:16:23 christos Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.5 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -64,10 +64,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.3 2003/11/02 08:37:48 christos Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -64,10 +64,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.3 2003/11/11 19:10:02 simonb Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -66,10 +66,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2003/09/27 03:33:00 matt Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.5 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -64,10 +64,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.3 2003/11/23 23:13:11 uwe Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -58,6 +58,7 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* is not set in the sigaction.
*/
if (act && (act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
/*
@ -67,6 +68,7 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
*/
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
return __sigaction_sigtramp(sig, act, oact, __sigtramp_siginfo_2, 2);

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2003/10/05 10:01:49 scw Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.5 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -64,10 +64,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.3 2003/10/12 14:42:03 pk Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -58,6 +58,7 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* is not set in the sigaction.
*/
if (act && (act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
/*
@ -67,6 +68,7 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
*/
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
return __sigaction_sigtramp(sig, act, oact, __sigtramp_siginfo_2, 2);

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.3 2003/10/27 00:45:36 christos Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -58,6 +58,7 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* is not set in the sigaction.
*/
if (act && (act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
/*
@ -67,6 +68,7 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
*/
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
return __sigaction_sigtramp(sig, act, oact, __sigtramp_siginfo_2, 2);

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.4 2003/09/30 19:05:41 matt Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.5 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -65,10 +65,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_2, 2);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigaction14_sigtramp.c,v 1.5 2003/10/18 20:11:04 briggs Exp $ */
/* $NetBSD: __sigaction14_sigtramp.c,v 1.6 2004/03/23 16:19:41 drochner Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -66,10 +66,12 @@ __libc_sigaction14(int sig, const struct sigaction *act, struct sigaction *oact)
* set in the sigaction.
*/
if ((act->sa_flags & SA_SIGINFO) == 0) {
int sav = errno;
rv = __sigaction_sigtramp(sig, act, oact,
__sigtramp_sigcontext_1, 1);
if (rv >= 0 || errno != EINVAL)
return rv;
errno = sav;
}
/*