summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--THANKS1
-rw-r--r--vapi/posix.vapi33
3 files changed, 41 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ff0dd182..0233b485f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-01-27 Jürg Billeter <j@bitron.ch>
+ * vapi/posix.vapi:
+
+ Add bindings for open and associated functions and constants,
+ patch by Michael Lauer
+
+2009-01-27 Jürg Billeter <j@bitron.ch>
+
* vala/valacodewriter.vala:
* vala/valamethod.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")]
@@ -270,6 +297,12 @@ namespace Posix {
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);
}