From: Reuben Thomas Date: Sat, 6 Apr 2024 13:01:27 +0000 (+0200) Subject: gnu: add binding for flock(2) and its constants X-Git-Tag: 0.56.17~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=068657ebc7371a47f19059fcfd5af9753f31d74b;p=thirdparty%2Fvala.git gnu: add binding for flock(2) and its constants --- diff --git a/vapi/gnu.vapi b/vapi/gnu.vapi index 5da463e36..beaa228cf 100644 --- a/vapi/gnu.vapi +++ b/vapi/gnu.vapi @@ -1,6 +1,6 @@ /* gnu.vapi * - * Copyright (C) 2020 Reuben Thomas + * Copyright (C) 2020, 2024 Reuben Thomas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -56,6 +56,18 @@ namespace Gnu { [PrintfFormat] public void error (int status, int errnum, string format, ...); + /** + * Provides the values for the 'operation' argument of 'flock'. + */ + [CCode (cname = "int", cprefix = "LOCK_", cheader_filename = "sys/file.h", has_type_id = false)] + public enum FlockOperation { + SH, + EX, + UN + } + [CCode (cheader_filename = "sys/file.h")] + public int flock (int fd, FlockOperation operation); + [CCode (cheader_filename = "quote.h")] public string quote (string arg); }