public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Andries E. Brouwer" <Andries.Brouwer-rh8NL+sEX9E@public.gmane.org>
To: Michael Kerrisk <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Cc: aj-l3A5Bk7waGM@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Andries Brouwer <Andries.Brouwer-rh8NL+sEX9E@public.gmane.org>,
	Fabian Kreutz
	<kreutz-WMH0Fc3rTAP1qYPpFx2fzhvVK+yQ3ZXh@public.gmane.org>
Subject: Re: math_error.7 draft 3, for review
Date: Wed, 16 Jul 2008 23:37:32 +0200	[thread overview]
Message-ID: <20080716213732.GA10011@ub> (raw)
In-Reply-To: <cfd18e0f0807160647o776d8523yb2f1ed4f0d946911-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.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 <math.h>
#include <stdio.h>
#include <stdlib.h>

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

  parent reply	other threads:[~2008-07-16 21:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16 13:47 math_error.7 draft 3, for review Michael Kerrisk
     [not found] ` <cfd18e0f0807160647o776d8523yb2f1ed4f0d946911-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-16 21:37   ` Andries E. Brouwer [this message]
2008-07-21 11:36     ` Michael Kerrisk
     [not found]       ` <cfd18e0f0807210436h558aae2cu46f0100c439a8e4a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-21 14:15         ` Andries E. Brouwer
2008-07-21 14:43           ` Michael Kerrisk
2008-07-21 10:12   ` Michael Kerrisk
     [not found]     ` <cfd18e0f0807210312s78b1183ao5ec2932a5317decc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25  9:31       ` Andreas Jaeger
     [not found] ` <cfd18e0f0807210314s6556f15bue41b1af46e28f77d@mail.gmail.com>
     [not found]   ` <517f3f820807210326x30ce95dayf18d72ba0ce03588@mail.gmail.com>
     [not found]     ` <m3r69ib8sz.fsf@gromit.moeb>
     [not found]       ` <m3r69ib8sz.fsf-Qr39nsLl7G5WFLYQ/5USTw@public.gmane.org>
2008-07-25  9:51         ` Michael Kerrisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080716213732.GA10011@ub \
    --to=andries.brouwer-rh8nl+sex9e@public.gmane.org \
    --cc=aj-l3A5Bk7waGM@public.gmane.org \
    --cc=kreutz-WMH0Fc3rTAP1qYPpFx2fzhvVK+yQ3ZXh@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox