Date: Sun, 14 Feb 2016 04:02:05 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Bruce Evans <brde@optusnet.com.au>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include Message-ID: <20160214035852.D918@besplex.bde.org> In-Reply-To: <20160213101623.GZ91220@kib.kiev.ua> References: <201602120738.u1C7cKpq093956@repo.freebsd.org> <20160212232717.P894@besplex.bde.org> <20160212143630.GS91220@kib.kiev.ua> <20160213021939.S1340@besplex.bde.org> <20160212173641.GV91220@kib.kiev.ua> <20160213070506.N2501@besplex.bde.org> <20160213101623.GZ91220@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 13 Feb 2016, Konstantin Belousov wrote: > On Sat, Feb 13, 2016 at 07:29:48AM +1100, Bruce Evans wrote: >> It needs a version number to be correct. Plain __POSIX_VISIBLE means >> all versions. __POSIX_VISBLE >= 200112 is probably good enough for >> the POSIX part. I don't know the correct number for XSI. Perhaps >> it can be simply omitted. _XOPEN_SOURCE >= 600 gives >> __XSI_VISIBLE >= 600 && _POSIX_C_SOURCE >= 200112. So __XSI_VISIBLE >> in the above is only to support XSI before 2001. We only support 1 >> XSI before that -- #500 which corresponds to 1996 POSIX. Very likely >> XSI did have ucontext_t then, so the above ifdef is correct. It is >> just hard to read. Easier than google hits though :-). I found a >> gnu man page about getcontext() being in SVID but couldn't easily >> find the history. > > I have SVID document labeled FINAL COPY June 15, 1995 First Edition. > There, it seems that ucontext.h is required. > > Below is the updated patch. > > diff --git a/include/signal.h b/include/signal.h > index 33be55c..217fadd 100644 > --- a/include/signal.h > +++ b/include/signal.h > @@ -36,8 +36,10 @@ > #include <sys/cdefs.h> > #include <sys/_types.h> > #include <sys/signal.h> > +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE > #include <machine/ucontext.h> > #include <sys/_ucontext.h> > +#endif > > #if __BSD_VISIBLE > /* Good. The old visibility bugs with mc_* should be fixed someday. I said that uc_* could be used. _mc_* should have been used originally. Maybe we can just change to either of these, since nothing except libc should have used the internals of mcontext_t. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160214035852.D918>