From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andries E. Brouwer" Subject: Re: math_error.7 draft 3, for review Date: Wed, 16 Jul 2008 23:37:32 +0200 Message-ID: <20080716213732.GA10011@ub> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-man-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Michael Kerrisk Cc: aj-l3A5Bk7waGM@public.gmane.org, linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andries Brouwer , Fabian Kreutz List-Id: linux-man@vger.kernel.org On Wed, Jul 16, 2008 at 03:47:41PM +0200, Michael Kerrisk wrote: > There are two signaling mechanism: mechanisms > If > .B_SVID_SOURCE > is defined, glibc provides the older > .I matherr () > error-reporting framework defined by SVID. Typo: .B _SVID_SOURCE But defining this does not suffice, one also needs the magic incantation _LIB_VERSION = _SVID_; Example: /* matherr demo; link with -lm */ #define _SVID_SOURCE #include #include #include int matherr(struct exception *x) { fprintf(stderr, "math error\n"); exit(1); } int main(){ double x; _LIB_VERSION = _SVID_; x = sqrt(-1.0); printf("x=%f\n", x); return 0; } Andries -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html