-
Notifications
You must be signed in to change notification settings - Fork 8k
Check struct stat.st_blocks with AC_CHECK_MEMBERS #13562
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
|
Hm, I guess, PHP needs more adjustments then if these are missing... |
636516d to
e165e93
Compare
|
Patch updated a bit further and branch rebased. It seems that there was a plan here to implement the missing st_blksize and st_blocks stat members on Windows at some point also. I'll wait with this PR a bit further as isn't critical. It only makes it a bit clearer how the usage should be done at this point. Also those above errors are not relevant in PHP as these two members are used conditionally in the code. |
bukka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can probably wait after creating PHP-8.5 branch...
The AC_STRUCT_ST_BLOCKS expects fileblocks object to be compiled with AC_LIBOBJ if stat.st_blocks is missing on the system. This can be simplified with the usual AC_CHECK_MEMBERS since PHP is using the stat.st_blocks (and stat.st_blksize) conditionally. These members are mostly present on all POSIX-based systems except on Windows these days. This also removes the obsolete HAVE_ST_BLOCKS symbol: https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/types.m4?h=v2.72#n1055 Additionally, the st_blksize and st_blocks members are checked conditionally with HAVE_ preprocessor macros. Instead of filtering Windows specifically here, the preprocessor macros HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_BLOCKS can be used.
e165e93 to
0aa1753
Compare
|
Branch rebased for the current master. In the meantime here was also another discussion at #18964 where this could be even more simplified (to check for only one of |
The AC_STRUCT_ST_BLOCKS expects fileblocks object to be compiled using AC_LIBOBJ in case stat.st_blocks is missing on some system. This can be simplified with the usual AC_CHECK_MEMBERS since PHP is using the stat.st_blocks (and stat.st_blksize) conditionally.
This also removes the obsolete HAVE_ST_BLOCKS symbol.
https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/types.m4?h=v2.72#n1055