hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 80bc1290bb1942bf498e1fff53e1d02e300acf75
parent 04c22fb380d3f942b6e2943e528a54a85acdb901
Author: Andrew Chambers <ac@acha.ninja>
Date:   Sat, 21 May 2022 22:11:19 +1200

rt: Add more fcntl locking definitions.

This change also updates existing definitions to match the flock struct.

Signed-off-by: Andrew Chambers <ac@acha.ninja>

Diffstat:
Mrt/+freebsd/types.ha | 7++++---
Mrt/+linux/types.ha | 4++++
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/rt/+freebsd/types.ha b/rt/+freebsd/types.ha @@ -378,12 +378,13 @@ export def F_SEAL_GROW: int = 0x0004; export def F_SEAL_WRITE: int = 0x0008; export def FD_CLOEXEC: int = 1; -export def F_RDLCK: int = 1; -export def F_UNLCK: int = 2; -export def F_WRLCK: int = 3; export def F_UNLCKSYS: int = 4; export def F_CANCEL: int = 5; +export def F_RDLCK: i16 = 1; +export def F_UNLCK: i16 = 2; +export def F_WRLCK: i16 = 3; + export def PRIO_PROCESS: int = 0; export def PRIO_PGRP: int = 1; export def PRIO_USER: int = 2; diff --git a/rt/+linux/types.ha b/rt/+linux/types.ha @@ -242,6 +242,10 @@ export def F_SETOWN_EX: int = 15; export def F_GETOWN_EX: int = 16; export def F_GETOWNER_UIDS: int = 17; +export def F_RDLCK: i16 = 0; +export def F_WRLCK: i16 = 1; +export def F_UNLCK: i16 = 2; + export def FD_CLOEXEC: int = 1; export type st_flock = struct {