Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
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
7 changes: 7 additions & 0 deletions src/core/stdc/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ version (FreeBSD)
///
enum int FP_ILOGBNAN = int.max;
}
else version (CRuntime_Bionic)
{
///
enum int FP_ILOGB0 = -int.max;
///
enum int FP_ILOGBNAN = int.max;
}
else
{
///
Expand Down
2 changes: 2 additions & 0 deletions src/core/sys/posix/fcntl.d
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ else version( CRuntime_Bionic )
enum F_WRLCK = 1;
enum F_UNLCK = 2;

enum LOCK_EX = 2;

version (X86)
{
enum O_CREAT = 0x40; // octal 0100
Expand Down
1 change: 1 addition & 0 deletions src/core/sys/posix/unistd.d
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ else version( FreeBSD )
else version( CRuntime_Bionic )
{
int fchdir(int) @trusted;
int flock(int, int) @trusted;
pid_t getpgid(pid_t) @trusted;
int lchown(in char*, uid_t, gid_t);
int nice(int) @trusted;
Expand Down
4 changes: 3 additions & 1 deletion src/rt/cover.d
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ version (Windows) HANDLE handle(int fd)

void lockFile(int fd)
{
version (Posix)
version (CRuntime_Bionic)
core.sys.posix.unistd.flock(fd, LOCK_EX); // exclusive lock
else version (Posix)
lockf(fd, F_LOCK, 0); // exclusive lock
else version (Windows)
{
Expand Down