-
-
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
Add fgetattrlist() #93
Conversation
da37455
to
46c3af0
Compare
A few notes:
|
That sounds like a missing dependency in the Makefile, though I haven't seen it myself. BTW, if you're working from the latest |
A couple of other notes:
|
86974c4
to
c581862
Compare
I've removed
I'm happy to let others decide that.
Added. The test needed
I've added some output in the case of test failure to state that it might be correctly failing due to an unexpected filesystem type. |
It was just a time error on the laptop. For some reason, it doesn't set the time until I go to the system preferences and look at the time settings.
Thanks. |
Done.
It'll be here when you want it. |
include/MacportsLegacySupport.h
Outdated
@@ -186,7 +186,7 @@ | |||
/* realpath() on < 1060 does not support modern NULL buffer usage */ | |||
#define __MP_LEGACY_SUPPORT_REALPATH_WRAP__ (__MPLS_TARGET_OSVER < 1060) | |||
|
|||
/* setattrlistat */ | |||
/* fsetattrlistat */ |
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.
Should mention both functions now.
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.
Done
src/fgetattrlist.c
Outdated
|
||
#if __MPLS_TARGET_OSVER < 1080 | ||
/* | ||
* Older systems don't correctly check if no attributes are to be set, which usually |
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.
Copy-'n-paste error: "set" isn't really correct here. Maybe "read" or "obtained".
Based on the description, I don't know if the problem addressed here exists on reads at all, though as you say, the "fix" probably doesn't hurt.
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.
Done
Note that since this interacts with That's the trouble with adding features while the framework is in flux. :-)
|
c581862
to
8cc1c7e
Compare
Of course, this patch could go in first, and the other patch could be rebased to take it into account. But I assume there must be good reasons not to do that. And there's no urgency for this. And, presmably, I'll need to change
Done. |
Well, #92 came first and is much more extensive. And once you see it, you'll see what the obvious addition is for The
Ah, you're right. I'd missed that. I'd also missed the header typo until after #92. :-) |
@@ -186,7 +186,7 @@ | |||
/* realpath() on < 1060 does not support modern NULL buffer usage */ | |||
#define __MP_LEGACY_SUPPORT_REALPATH_WRAP__ (__MPLS_TARGET_OSVER < 1060) | |||
|
|||
/* setattrlistat */ | |||
/* fsetattrlistat, fgetattrlistat */ |
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.
There's a trivial lexical conflict here with the updated master
, due to non-conflicting changes on adjacent lines.
src/fgetattrlist.c
Outdated
|
||
/* MP support header */ | ||
#include "MacportsLegacySupport.h" | ||
#if __MP_LEGACY_SUPPORT_FSETATTRLIST__ |
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.
The flag name needs to change to __MPLS_LIB_SUPPORT_FSETATTRLIST__
, to match the new naming scheme.
Also, I think it's visually better to put a blank line between the include and the conditional. I already did that in fsetattrlist.c
, but it wouldn't have been in master
at the time you created this PR.
src/fgetattrlist.c
Outdated
return ret; | ||
} | ||
|
||
#endif /* __MP_LEGACY_SUPPORT_FSETATTRLIST__ */ |
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.
Same name change here.
@macportsraf |
8cc1c7e
to
5d60b93
Compare
Thanks. It's updated. |
Almost. :-) As previously mentioned, the test commit should include this:
|
5d60b93
to
b34b0bb
Compare
Thanks. It's there now. |
Umm, you didn't actually change it:
Did you forget a |
b34b0bb
to
f6d11ae
Compare
Oops. It's there now. |
Yup. That now matches what I'd already tested, on:
That actually understates it, since I also built and ran the tests with all compatible SDKs not earlier than the target OS. @mascguy |
Great, I'll go ahead and merge |
This adds an implementation of
fgetattrlist()
. Tested on 10.14.6, 10.6.8, and 10.4.11 (ppc) but only the 10.4 test means anything. The test is very basic. It just calls the function on the current directory's file descriptor, and only requires that it doesn't return an error.I noticed a strange thing when testing on 10.4 (ppc). The first time I run:
I get an error:
But if I run it again, it works. This happens with or without this change. I suspect that it doesn't matter.