Commit 4dd0822a36

LeRoyce Pearson <leroycepearson@geemili.xyz>
2020-04-03 07:50:12
Add LOCK_* constants to BSD `os/bits`
1 parent 733f1c2
Changed files (3)
lib/std/os/bits/dragonfly.zig
@@ -692,6 +692,11 @@ pub const F_DUP2FD = 10;
 pub const F_DUPFD_CLOEXEC = 17;
 pub const F_DUP2FD_CLOEXEC = 18;
 
+pub const LOCK_SH = 1;
+pub const LOCK_EX = 2;
+pub const LOCK_UN = 8;
+pub const LOCK_NB = 4;
+
 pub const Flock = extern struct {
     l_start: off_t,
     l_len: off_t,
lib/std/os/bits/freebsd.zig
@@ -367,6 +367,11 @@ pub const F_RDLCK = 1;
 pub const F_WRLCK = 3;
 pub const F_UNLCK = 2;
 
+pub const LOCK_SH = 1;
+pub const LOCK_EX = 2;
+pub const LOCK_UN = 8;
+pub const LOCK_NB = 4;
+
 pub const F_SETOWN_EX = 15;
 pub const F_GETOWN_EX = 16;
 
lib/std/os/bits/netbsd.zig
@@ -447,6 +447,11 @@ pub const F_RDLCK = 1;
 pub const F_WRLCK = 3;
 pub const F_UNLCK = 2;
 
+pub const LOCK_SH = 1;
+pub const LOCK_EX = 2;
+pub const LOCK_UN = 8;
+pub const LOCK_NB = 4;
+
 pub const FD_CLOEXEC = 1;
 
 pub const SEEK_SET = 0;