Repository navigation
Conversation
BsAtHome
reviewed
Dec 4, 2026
The interpreter uses M_PIl and M_PI_2l, which the macOS SDK leaves undefined by default. Pass -D__MATH_LONG_DOUBLE_CONSTANTS to interpreter compilation on Darwin so the SDK supplies both values on the first inclusion of math.h, including through another header.
smoe
force-pushed
the
codex/darwin-interpreter-constants-upstream
branch
from
December 4, 2026 10:56
6ebf609 to
98fad54
Compare
smoe
marked this pull request as draft
December 4, 2026 11:00
Substitute Autoconf's host_os into Makefile.inc so the interpreter can select the Darwin SDK opt-in using the host chosen by configure.
smoe
marked this pull request as ready for review
December 4, 2026 11:07
Collaborator
Author
|
Did not like that local test of the host operating system, now forwarding it from configure. The already available "BUILD_SYS" is something else, which confused me. |
Contributor
You new version looks very clean and simple.
Yeah, that denotes whether it is building the code from the tree (used often in tests not possible in installed code). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The interpreter uses M_PIl and M_PI_2l, which the macOS SDK does not expose.
This patch supplies pi and pi/2 as long double in the private interpreter header, using the SDK's own literals.
It defines each constant only when it is missing on Darwin. That constraint for the macOS/Darwin does not seem necessary, but it provides context on why these definitions are performed and more operating systems hopefully join in the not too far future.