From ece032980fc7a331a49a37bb3026d1629988aa22 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 27 Jan 1997 01:16:51 +0000 Subject: [PATCH] do not conflict against generic siginfo! --- sys/compat/svr4/svr4_misc.c | 37 +++++++++++++++++----------------- sys/compat/svr4/svr4_siginfo.h | 20 +++++++++--------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index ca3c73d3e3a..55c6032a3a0 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_misc.c,v 1.6 1996/08/03 15:29:32 deraadt Exp $ */ +/* $OpenBSD: svr4_misc.c,v 1.7 1997/01/27 01:16:51 deraadt Exp $ */ /* $NetBSD: svr4_misc.c,v 1.36 1996/03/30 22:38:02 christos Exp $ */ /* @@ -906,42 +906,43 @@ svr4_setinfo(p, st, s) bzero(&i, sizeof(i)); - i.si_signo = SVR4_SIGCHLD; - i.si_errno = 0; /* XXX? */ + i.svr4_si_signo = SVR4_SIGCHLD; + i.svr4_si_errno = 0; /* XXX? */ if (p) { - i.si_pid = p->p_pid; + i.svr4_si_pid = p->p_pid; if (p->p_stat == SZOMB) { - i.si_stime = p->p_ru->ru_stime.tv_sec; - i.si_utime = p->p_ru->ru_utime.tv_sec; + i.svr4_si_stime = p->p_ru->ru_stime.tv_sec; + i.svr4_si_utime = p->p_ru->ru_utime.tv_sec; } else { - i.si_stime = p->p_stats->p_ru.ru_stime.tv_sec; - i.si_utime = p->p_stats->p_ru.ru_utime.tv_sec; + i.svr4_si_stime = p->p_stats->p_ru.ru_stime.tv_sec; + i.svr4_si_utime = p->p_stats->p_ru.ru_utime.tv_sec; } } if (WIFEXITED(st)) { - i.si_status = WEXITSTATUS(st); - i.si_code = SVR4_CLD_EXITED; + i.svr4_si_status = WEXITSTATUS(st); + i.svr4_si_code = SVR4_CLD_EXITED; } else if (WIFSTOPPED(st)) { - i.si_status = bsd_to_svr4_sig[WSTOPSIG(st)]; + i.svr4_si_status = bsd_to_svr4_sig[WSTOPSIG(st)]; - if (i.si_status == SVR4_SIGCONT) - i.si_code = SVR4_CLD_CONTINUED; + if (i.svr4_si_status == SVR4_SIGCONT) + i.svr4_si_code = SVR4_CLD_CONTINUED; else - i.si_code = SVR4_CLD_STOPPED; + i.svr4_si_code = SVR4_CLD_STOPPED; } else { - i.si_status = bsd_to_svr4_sig[WTERMSIG(st)]; + i.svr4_si_status = bsd_to_svr4_sig[WTERMSIG(st)]; if (WCOREDUMP(st)) - i.si_code = SVR4_CLD_DUMPED; + i.svr4_si_code = SVR4_CLD_DUMPED; else - i.si_code = SVR4_CLD_KILLED; + i.svr4_si_code = SVR4_CLD_KILLED; } DPRINTF(("siginfo [pid %ld signo %d code %d errno %d status %d]\n", - i.si_pid, i.si_signo, i.si_code, i.si_errno, i.si_status)); + i.svr4_si_pid, i.svr4_si_signo, i.svr4_si_code, + i.svr4_si_errno, i.svr4_si_status)); return copyout(&i, s, sizeof(i)); } diff --git a/sys/compat/svr4/svr4_siginfo.h b/sys/compat/svr4/svr4_siginfo.h index a14e81f94f7..1852beea845 100644 --- a/sys/compat/svr4/svr4_siginfo.h +++ b/sys/compat/svr4/svr4_siginfo.h @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_siginfo.h,v 1.2 1996/08/02 20:35:40 niklas Exp $ */ +/* $OpenBSD: svr4_siginfo.h,v 1.3 1997/01/27 01:16:52 deraadt Exp $ */ /* $NetBSD: svr4_siginfo.h,v 1.2 1995/07/04 19:47:05 christos Exp $ */ /* @@ -96,16 +96,16 @@ typedef union svr4_siginfo { } _info; } svr4_siginfo_t; -#define si_signo _info._signo -#define si_code _info._code -#define si_errno _info._errno +#define svr4_si_signo _info._signo +#define svr4_si_code _info._code +#define svr4_si_errno _info._errno -#define si_pid _info._reason._child._pid -#define si_stime _info._reason._child._stime -#define si_status _info._reason._child._status -#define si_utime _info._reason._child._utime +#define svr4_si_pid _info._reason._child._pid +#define svr4_si_stime _info._reason._child._stime +#define svr4_si_status _info._reason._child._status +#define svr4_si_utime _info._reason._child._utime -#define si_addr _info._reason._fault._addr -#define si_trap _info._reason._fault._trap +#define svr4_si_addr _info._reason._fault._addr +#define svr4_si_trap _info._reason._fault._trap #endif /* !_SVR4_SIGINFO_H_ */ -- 2.20.1