Skip to content

Drop superfluous LONG_MAX/LONG_MIN fallback definitions #15667

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

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Aug 30, 2024

Both macros are supposed to be defined in limits.h (C99) and as such it is superfluous to provide fallback definitions. Even worse, because these fallback definitions didn't cater to LP64, ILP64 and SILP64 data models (and maybe some rather uncommon ones), but just assumed ILP32, they are confusing.


To not forget about that removal, which should be postponed to PHP 8.5/9.0.

Both macros are supposed to be defined in limits.h (C99) and as such it
is superfluous to provide fallback definitions.  Even worse, because
these fallback definitions didn't cater to LP64, ILP64 and SILP64 data
models (and maybe some rather uncommon ones), but just assumed ILP32,
they are confusing.
@cmb69
Copy link
Member Author

cmb69 commented Aug 30, 2024

@derickr, there are also such fallback definitions in timelib_private.h. Consider to remove them.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me to merge after 8.4 has been cut from master.

@cmb69 cmb69 marked this pull request as ready for review September 26, 2024 13:39
@cmb69 cmb69 changed the title [NOT FOR PHP 8.4] Drop superfluous LONG_MAX/LONG_MIN fallback definitions Drop superfluous LONG_MAX/LONG_MIN fallback definitions Sep 26, 2024
@cmb69 cmb69 merged commit 825509e into php:master Sep 27, 2024
9 of 10 checks passed
@cmb69 cmb69 deleted the cmb/LONG_MAX branch September 27, 2024 15:35
jorgsowa pushed a commit to jorgsowa/php-src that referenced this pull request Oct 1, 2024
Both macros are supposed to be defined in limits.h (C99) and as such it
is superfluous to provide fallback definitions.  Even worse, because
these fallback definitions didn't cater to LP64, ILP64 and SILP64 data
models (and maybe some rather uncommon ones), but just assumed ILP32,
they are confusing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants