-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Import CoreFoundation sources from High Sierra #1305
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
@swift-ci please test |
@phausler does this fix SR-3158? Looks like it might from this: -#define FORMAT_STRING_MAX_LENGTH 29 // Length of "yyyy-'W'ww-dd'T'HH:mm:ssXXXXX"
+#define FORMAT_STRING_MAX_LENGTH 33 // Length of "yyyy-'W'ww-dd'T'HH:mm:ss.SSSXXXXX"
...
+ // Add support for fracional seconds
+ if (includeFractionalSecs) {
+ CFStringAppendCString(resultStr, ".SSS", kCFStringEncodingUTF8);
+ } Nitpick: there's a typo in that comment |
That was part of our support for fractional seconds in ISO8601. In the ObjC header (NSISO8601DateFormatter.h):
|
@swift-ci please test |
@phausler looks like there are conflicts - can you rebase onto master and try again? |
@phausler did you note where those are? I wouldn't want us to lose things by accident... |
The specific case that was reverted was in two spots: 1) the CFLog constants and 2) CFInternal.h definition for CF_EXPORT |
@swift-ci please test |
1 similar comment
@swift-ci please test |
@phausler ready to merge this? |
Yep seems good to go by me |
@swift-ci please test and merge |
static bool __CFLocaleGetMeasurementSystemForPreferences(CFTypeRef metricPref, CFTypeRef measurementPref, UMeasurementSystem *outMeasurementSystem) { | ||
if (metricPref || measurementPref) { | ||
if (metricPref == kCFBooleanTrue && measurementPref && CFEqual(measurementPref, _measurementUnitsInches)) { | ||
*outMeasurementSystem = UMS_UK; |
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.
This broke the build on Ubuntu 14.04 because UMS_UK is not defined. Can we revert this for 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.
I’d prefer not to and to instead ifdef out the usage
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 looks like @slavapestov reverted the commit in
So this will need to be re-reverted again at some point.
This is the latest changes from CoreFoundation, round tripped to include the latest additions in High Sierra. Careful review should be taken for non x86_64 linux platforms since we have not yet tested other targets. Some header paths were simplified to use __has_include instead of relying on
DEPLOYMENT_RUNTIME_SWIFT
macros. Other areas were unfortunately reverted back to the Darwin implementation since the open source versions caused problems when integrating back into the Darwin version.Major areas of consideration include the way retain counts are handled and CF type bit fields work.
The Xcode project now removes the index store disable flag which should vastly improve build times (since that option is no longer needed)