-
-
Notifications
You must be signed in to change notification settings - Fork 68
timelib.h: remove fallbacks for C99 integer types #141
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
Conversation
These are mandatory in C99, and no compile-time check is needed. See php/php-src#10304 for the PHP pull request.
These types are optional as per 7.18.11.3 of the ISO/IEC 9899:1999 spec. |
A more exact description is in my PHP PR: "Actually, the fixed-size integer types are not mandatory, but if they are really not available on some theoretical system, PHP's fallbacks won't work either, so nothing is gained from this check." Your library is not buildable either on systems where those types are not available! Which makes your reason to reject this PR pointless. |
btw. names beginning with 7.26: "All external names described below are reserved no matter what headers are included by the program." |
Why would the fallbacks not work? Is it because the |
This. If |
btw. in new code, I tend to use |
I do not have an official spec at hand, but a draft says in 7.18.1.1.3:
Assuming that the wording is the same in the final spec, since "shall" denotes a requirement, I'd argue that @MaxKellermann is correct (maybe except for signed integers wrt. the two's complement; timelib may not rely on that). This is, of course, only valid for a perfect world where all supported environments actually conform to this spec; on the other hand, we may never know until we try, and actually using the "classic" types such as |
I am not intending to change this. |
These are mandatory in C99, and no compile-time check is needed.
See php/php-src#10304 for the PHP pull request.