Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

[macOS Big Sur] libc symbols for both ARM Mac and x86_64 Mac #3226

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
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
27 changes: 19 additions & 8 deletions src/core/stdc/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -1037,14 +1037,25 @@ else version (Darwin)
// other Darwins
version (OSX)
{
pure int __fpclassify(real x);
pure int __isfinite(real x);
pure int __isinf(real x);
pure int __isnan(real x);
alias __fpclassifyl = __fpclassify;
alias __isfinitel = __isfinite;
alias __isinfl = __isinf;
alias __isnanl = __isnan;
version (AArch64)
{
// Available in macOS ARM
pure int __fpclassifyl(real x);
pure int __isfinitel(real x);
pure int __isinfl(real x);
pure int __isnanl(real x);
}
else
{
pure int __fpclassify(real x);
pure int __isfinite(real x);
pure int __isinf(real x);
pure int __isnan(real x);
alias __fpclassifyl = __fpclassify;
alias __isfinitel = __isfinite;
alias __isinfl = __isinf;
alias __isnanl = __isnan;
}
}
else
{
Expand Down
15 changes: 13 additions & 2 deletions src/core/sys/posix/dirent.d
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ else version (Darwin)
// Other Darwin variants (iOS, TVOS, WatchOS) only support 64-bit inodes,
// no suffix needed
version (OSX)
pragma(mangle, "readdir$INODE64") dirent* readdir(DIR*);
{
version (AArch64)
dirent* readdir(DIR*);
else
pragma(mangle, "readdir$INODE64") dirent* readdir(DIR*);
}
else
dirent* readdir(DIR*);
}
Expand Down Expand Up @@ -416,7 +421,13 @@ else
// in else below.
version (OSX)
{
version (D_LP64)
version (AArch64)
{
int closedir(DIR*);
DIR* opendir(const scope char*);
void rewinddir(DIR*);
}
else version (D_LP64)
{
int closedir(DIR*);
pragma(mangle, "opendir$INODE64") DIR* opendir(const scope char*);
Expand Down
15 changes: 12 additions & 3 deletions src/core/sys/posix/sys/stat.d
Original file line number Diff line number Diff line change
Expand Up @@ -2210,9 +2210,18 @@ else version (Darwin)
// inode functions by appending $INODE64 to newer 64-bit inode functions.
version (OSX)
{
pragma(mangle, "fstat$INODE64") int fstat(int, stat_t*);
pragma(mangle, "lstat$INODE64") int lstat(const scope char*, stat_t*);
pragma(mangle, "stat$INODE64") int stat(const scope char*, stat_t*);
version (AArch64)
{
int fstat(int, stat_t*);
int lstat(const scope char*, stat_t*);
int stat(const scope char*, stat_t*);
}
else
{
pragma(mangle, "fstat$INODE64") int fstat(int, stat_t*);
pragma(mangle, "lstat$INODE64") int lstat(const scope char*, stat_t*);
pragma(mangle, "stat$INODE64") int stat(const scope char*, stat_t*);
}
}
else
{
Expand Down