From: Jürg Billeter Date: Tue, 27 Jan 2009 21:53:56 +0000 (+0000) Subject: Add bindings for open and associated functions and constants, patch by X-Git-Tag: 0.5.7~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e4327e90a18d1a798977fbfbcdf1fb69066e372;p=thirdparty%2Fvala.git Add bindings for open and associated functions and constants, patch by 2009-01-27 Jürg Billeter * vapi/posix.vapi: Add bindings for open and associated functions and constants, patch by Michael Lauer svn path=/trunk/; revision=2406 --- diff --git a/ChangeLog b/ChangeLog index 9ff0dd182..0233b485f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-27 Jürg Billeter + + * vapi/posix.vapi: + + Add bindings for open and associated functions and constants, + patch by Michael Lauer + 2009-01-27 Jürg Billeter * vala/valacodewriter.vala: diff --git a/THANKS b/THANKS index 10da1711c..09b52dec8 100644 --- a/THANKS +++ b/THANKS @@ -54,6 +54,7 @@ Mark Lee Mart Roosmaa Mathias Hasselmann Matías De la Puente +Michael Lauer Michael Lawrence Michael Terry Mikael Hermansson diff --git a/vapi/posix.vapi b/vapi/posix.vapi index 900b679f0..2e4abf6bf 100644 --- a/vapi/posix.vapi +++ b/vapi/posix.vapi @@ -186,6 +186,33 @@ namespace Posix { [CCode (cheader_filename = "errno.h")] public const int EXDEV; + [CCode (cheader_filename = "fcntl.h")] + public const int O_ACCMODE; + [CCode (cheader_filename = "fcntl.h")] + public const int O_RDONLY; + [CCode (cheader_filename = "fcntl.h")] + public const int O_WRONLY; + [CCode (cheader_filename = "fcntl.h")] + public const int O_RDWR; + [CCode (cheader_filename = "fcntl.h")] + public const int O_CREAT; + [CCode (cheader_filename = "fcntl.h")] + public const int O_EXCL; + [CCode (cheader_filename = "fcntl.h")] + public const int O_NOCTTY; + [CCode (cheader_filename = "fcntl.h")] + public const int O_TRUNC; + [CCode (cheader_filename = "fcntl.h")] + public const int O_APPEND; + [CCode (cheader_filename = "fcntl.h")] + public const int O_NONBLOCK; + [CCode (cheader_filename = "fcntl.h")] + public const int O_SYNC; + [CCode (cheader_filename = "fcntl.h")] + public const int O_ASYNC; + [CCode (cheader_filename = "fcntl.h")] + public int open (string path, int oflag); + [CCode (cheader_filename = "string.h")] public int memcmp (void* s1, void* s2, size_t n); [CCode (cheader_filename = "string.h")] @@ -269,7 +296,13 @@ namespace Posix { [CCode (cheader_filename = "sys/socket.h")] public int socket (int domain, int type, int protocol); + [CCode (cheader_filename = "unistd.h")] + public int close (int fd); [CCode (cheader_filename = "unistd.h")] public int execl (string path, params string[] arg); + [CCode (cheader_filename = "unistd.h")] + public ssize_t read (int fd, void* buf, size_t count); + [CCode (cheader_filename = "unistd.h")] + public ssize_t write (int fd, void* buf, size_t count); }