From owner-svn-src-all@freebsd.org Sat Feb 13 17:02:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F679AA6A34; Sat, 13 Feb 2016 17:02:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 25F171336; Sat, 13 Feb 2016 17:02:06 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c110-21-41-193.carlnfd1.nsw.optusnet.com.au (c110-21-41-193.carlnfd1.nsw.optusnet.com.au [110.21.41.193]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 682F0427224; Sun, 14 Feb 2016 04:02:05 +1100 (AEDT) Date: Sun, 14 Feb 2016 04:02:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , 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 In-Reply-To: <20160213101623.GZ91220@kib.kiev.ua> Message-ID: <20160214035852.D918@besplex.bde.org> 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=73JWPhLeruqQCjN69UNZtQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=vl1RCeKtdUqxWFC5bxoA:9 a=Sp4CEbam_OlKciZH:21 a=6yJpfTvQ7WEnSl8h:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 17:02:07 -0000 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 > #include > #include > +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE > #include > #include > +#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