Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define _GNU_SOURCE when including fenv.h #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesjer
Copy link
Contributor

Fedora has 2 architectures, ppc64le and s390x, where fedisableexcept is needed. However, with glibc 2.37 at least, the fedisableexcept prototype is visible only if _GNU_SOURCE is defined. This is remarked on in the "glibc notes" section of the fedisableexcept man page on Linux systems.

Also, since fenv.h is a system header file rather than a local header file, use angle brackets with #include instead of quotes.

@glebbelov
Copy link
Contributor

glebbelov commented Nov 11, 2024

This has been partially accepted, as follows:

20241111
   fpinit.c in solvers.tgz and solvers2.tgz:  insert
     #define _GNU_SOURCE
before
     include "fenv.h"
to make fedisableexcept() visible on some systems (as someone
requested).  It is "fenv.h" rather than <fenv.h> because it was
sometimes necessary to supply a custom fenv.h, as indicated in
the comment

/* Some Intel Linux systems (e.g., S.u.S.E. 5.2) come with a suitable
fenv.h, */
/* but some (e.g., S.U.S.E. 6.1) do not.  This is for the latter
systems.  */

Let us know if anything else is necessary. The change will appear on netlib, and we will port it to this repository too.

@jamesjer
Copy link
Contributor Author

That's fine. The _GNU_SOURCE part was the important part. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants