Use the correct macros isnan, isinf for libc compatibility #66

Merged
SlavekB merged 1 commits from feat/musl into master 4 years ago
selk commented 4 years ago
Collaborator

Changes related to this commit:

  • Clean up #if mess.

  • Use unconditionally the correct macros isnan, isinf.

  • Remove redudant macros from the build system.

Changes related to this commit: - Clean up #if mess. - Use unconditionally the correct macros isnan, isinf. - Remove redudant macros from the build system.
selk commented 4 years ago
Poster
Collaborator

Summary:

  • There are non-standard "functions" names used in kjs/operations.cpp: _isnan, _isinf, _finite.

  • The isnan, isinf functions are really macros accorded to the C99 standard.

  • It is possible to let (have again) isnan and isinf in the build system to report if these functions are supported or not per-system basis, it could be redundant according to the conclusion:

"Regardless of whether they're macros or functions (the standard requires macros and they will be macros in any system from the past 20 years) even if they were functions we use them exactly the same way, by including math.h and using them by name."

Extra notes:

  • The PR assumes that we will be in the safe side (without checking isnan, isinf from the build system).

  • The previous defined macros from the build system is not relevant to the relevant kjs/operations.cpp file - according to this PR.

Summary: - There are non-standard "functions" names used in kjs/operations.cpp: _isnan, _isinf, _finite. - The isnan, isinf functions are really macros accorded to the C99 standard. - It is possible to let (have again) isnan and isinf in the build system to report if these functions are supported or not per-system basis, it could be redundant according to the conclusion: "Regardless of whether they're macros or functions (the standard requires macros and they will be macros in any system from the past 20 years) even if they were functions we use them exactly the same way, by including math.h and using them by name." Extra notes: - The PR assumes that we will be in the safe side (without checking isnan, isinf from the build system). - The previous defined macros from the build system is not relevant to the relevant kjs/operations.cpp file - according to this PR.
SlavekB approved these changes 4 years ago
SlavekB left a comment
Owner

It looks good. Tested on Debian and FreeBSD – everything seems to be fine.

It looks good. Tested on Debian and FreeBSD – everything seems to be fine.
SlavekB closed this pull request 4 years ago
SlavekB deleted branch feat/musl 4 years ago
SlavekB added this to the R14.0.8 release milestone 4 years ago
The pull request has been merged as 8ae17a5d9d.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdelibs#66
Loading…
There is no content yet.