Skip to content

[wasm] Port CoreFoundation/NumberDate.subproj #4907

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CoreFoundation/NumberDate.subproj/CFDate.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ CFAbsoluteTime CFGregorianDateGetAbsoluteTime(CFGregorianDate gdate, CFTimeZoneR
CFAbsoluteTime at;
at = 86400.0 * __CFAbsoluteFromYMD(gdate.year - 2001, gdate.month, gdate.day);
at += 3600.0 * gdate.hour + 60.0 * gdate.minute + gdate.second;
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
if (NULL != tz) {
__CFGenericValidateType(tz, CFTimeZoneGetTypeID());
}
Expand All @@ -378,7 +378,7 @@ CFGregorianDate CFAbsoluteTimeGetGregorianDate(CFAbsoluteTime at, CFTimeZoneRef
int64_t absolute, year;
int8_t month, day;
CFAbsoluteTime fixedat;
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
if (NULL != tz) {
__CFGenericValidateType(tz, CFTimeZoneGetTypeID());
}
Expand Down Expand Up @@ -406,7 +406,7 @@ CFAbsoluteTime CFAbsoluteTimeAddGregorianUnits(CFAbsoluteTime at, CFTimeZoneRef
CFAbsoluteTime candidate_at0, candidate_at1;
uint8_t monthdays;

#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
if (NULL != tz) {
__CFGenericValidateType(tz, CFTimeZoneGetTypeID());
}
Expand Down Expand Up @@ -525,7 +525,7 @@ CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits(CFAbsoluteTime at1,
SInt32 CFAbsoluteTimeGetDayOfWeek(CFAbsoluteTime at, CFTimeZoneRef tz) {
int64_t absolute;
CFAbsoluteTime fixedat;
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
if (NULL != tz) {
__CFGenericValidateType(tz, CFTimeZoneGetTypeID());
}
Expand All @@ -541,7 +541,7 @@ SInt32 CFAbsoluteTimeGetDayOfYear(CFAbsoluteTime at, CFTimeZoneRef tz) {
CFAbsoluteTime fixedat;
int64_t absolute, year;
int8_t month, day;
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
if (NULL != tz) {
__CFGenericValidateType(tz, CFTimeZoneGetTypeID());
}
Expand All @@ -560,7 +560,7 @@ SInt32 CFAbsoluteTimeGetWeekOfYear(CFAbsoluteTime at, CFTimeZoneRef tz) {
int64_t absolute, year;
int8_t month, day;
CFAbsoluteTime fixedat;
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
if (NULL != tz) {
__CFGenericValidateType(tz, CFTimeZoneGetTypeID());
}
Expand Down