From: Corinna Vinschen <vinschen@redhat.com>
To: joel@rtems.org
Cc: newlib@sourceware.org
Subject: Re: [PATCH v5 2/3] Add default implementation of fenv.h and all methods
Date: Thu, 08 Aug 2019 15:42:00 -0000 [thread overview]
Message-ID: <20190808154231.GN11632@calimero.vinschen.de> (raw)
In-Reply-To: <20190808153856.GK11632@calimero.vinschen.de>
[-- Attachment #1: Type: text/plain, Size: 1907 bytes --]
On Aug 8 17:38, Corinna Vinschen wrote:
> Hi Joel,
>
> I just noticed another problem in terms of using this (partially)
> with Cygwin:
>
> On Aug 8 10:10, joel@rtems.org wrote:
> > + * NOTE: The extern'ed variable fe_default_env_p is an implementation
> > + * detail of this stub. FE_DFL_ENV must point to an instance of
> > + * fenv_t with the default fenv_t. The format of fenv_t and where
> > + * FE_DFL_ENV is are implementation specific.
> > + */
> > +extern const fenv_t *fe_dfl_env_p;
>
> Can we please rename this pointer to _fe_dfl_env, as it's already
> defined in Cygwin? The reason is that this pointer is exported
> into user space via ...
>
> > +#define FE_DFL_ENV fe_dfl_env_p
>
> If you change the name here, Cygwin will not be able to use
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Make that "If you don't use the _fe_dfl_env name here..."
> > diff --git a/newlib/libm/fenv/fe_dfl_env.c b/newlib/libm/fenv/fe_dfl_env.c
> > [...]
>
> this file as storage for the default environment so as not to break
> backward compatibility with existing executables.
>
> > + * This is a non-functional implementation that should be overridden
> > + * by an architecture specific implementation in newlib/libm/machine/ARCH.
> > + *
> > + * The implmentation must defined FE_DFL_ENV to point to a default
> > + * environment of type fenv_t.
> > + */
> > +const fenv_t fe_dfl_env = { 0 };
> > +const fenv_t *fe_dfl_env_p = &fe_dfl_env;
>
> The funny thing here is, that this file could be used by all targets,
> regardless of the definition of fenv_t, without the need to redefine it
> per target. Only Cygwin couldn't. It would have to provide it's own,
> even if the Cygwin code itself gets moved to i386 and x86_64, unless
> fe_dfl_env_p is renamed to _fe_dfl_env.
Sorry,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-08-08 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 15:11 joel
2019-08-08 15:39 ` Corinna Vinschen
2019-08-08 15:42 ` Corinna Vinschen [this message]
2019-08-08 15:51 ` Joel Sherrill
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=20190808154231.GN11632@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=joel@rtems.org \
--cc=newlib@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).