]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
pop3d: support fcntl locks on NetBSD and OpenBSD
authorEric Wong <e@80x24.org>
Sat, 9 Sep 2023 01:48:38 +0000 (01:48 +0000)
committerEric Wong <e@80x24.org>
Sat, 9 Sep 2023 11:54:31 +0000 (11:54 +0000)
commit2b51fcc17a19904c0c63750ff3766d9c4b3c024c
tree7405ea07ce021d16737cf5592622da489e794220
parent43690b473b0c068e1587f93d1869aec95dbbc127
pop3d: support fcntl locks on NetBSD and OpenBSD

MboxLock already supported it since it locked the whole file,
but POP3D requires more fine-grained locking at file offsets.

I wonder if "struct flock" is old enough for it to be the same
across all the BSDs, it certainly seems so.

I originally considered using C11 `_Generic' support for the
struct offset/type dumping as I have in other projects, but
I am not ready to depend on C11 for this project, yet.

While we're modifying devel/sysdefs-list, add some Linux-only
structs to verify our `pack' templates are correct and remain
so when we encounter new architectures.
devel/sysdefs-list
lib/PublicInbox/POP3D.pm
t/pop3d.t