-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Multiple updates, mostly for *stat*() #105
Merged
Merged
Conversation
This file contains 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
The FORCE_ARCH removal was overlooked in cf1a237. TESTED: Builds still work.
See the comment for details. TESTED: Builds and passes tests on all platforms.
This provides support in the headers for the stat64 struct with the 10.4 SDK, as follows: MacportsLegacySupport.h adds feature flags for stat64 support on 10.4. The internal __DARWIN_STRUCT_STAT64 macro is defined. Symbol versioning macros related to INODE64 are added. The "struct stat64" definition is provided when appropriate, along with prototypes for the *stat64() functions. Accommodations are made for the switch from _APPLE_C_SOURCE to _DARWIN_C_SOURCE between the 10.4 and 10.5 SDKs. It does not include library support for *stat64() on 10.4, which is left for a separate commit. TESTED: Builds and passes tests on all platforms.
This makes the function argument types consistent. TESTED: Builds and passes tests on all platforms.
This adds support for some 64-bit-inode function variants on 10.4. TESTED: Builds and passes tests on all platforms.
This changes the inconsistency fix to make it easier to make use of the partial 64-bit-inode suport on 10.4. It has the effect of making the 32-bit behavior consistent with the 64-bit behavior. TESTED: Builds and passes tests on all platforms.
This currently excludes the fstatat*() tests, until the known issue is fixed. TESTED: Fails on 10.4 prior to statxx addition. Passes on all platforms with statxx.
Adds the missing versioning to the fstatat() prototype. Moves fstatat*() to statxx.c (from atcalls.c), where it has the proper "stat build" environment. Provides all variants of fstatat(), for inode bitness compatibility. Removes fstatat$INODE64 from symbol_aliases.c, since it now has an explicit definition. Also removes it from test_symbol_aliases. Fixes the parameter names in the "at" function prototypes to match the manpages. TESTED: Builds and passes tests on all platforms.
This adds tests for fstatat() and fstatat64() to test_stat, both with AT_FDCWD and with a real directory. TESTED: Fails prior to fstatat() update to statxx. Builds and passes tests on all platforms after update.
This was never appropriate - see the comment. TESTED: Builds and passes tests on all platforms.
The condition for disabling the ino32 wrappers is now more correct. The comments and message are improved for the ino64 wrappers. TESTED: Builds and passes tests on all platforms.
The new stat test covers everything that the old test did and more, along with fewer restrictions and better messages.
@mascguy |
mascguy
approved these changes
Dec 1, 2024
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.
LGTM
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.
See individual commits.
Notably:
stat
inconsistency in some 32-bit 10.4 builds.stat64
header support for 10.4 SDK.INODE64
support for*stat*()
on 10.4.fstatat*()
support, similar to previous item, fixing buffer overrun in some cases.*stat*()
tests.Tested (both from repo and via temp Portfile) on: