]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix: Add writev and readv POSIX compliant functions.
authorJavier Jardón <jjardon@gnome.org>
Wed, 12 Jan 2011 11:44:18 +0000 (11:44 +0000)
committerLuca Bruno <lucabru@src.gnome.org>
Sat, 15 Jan 2011 22:28:53 +0000 (23:28 +0100)
Fixes bug 639306.

vapi/posix.vapi

index af15a27806b8b1dd8207c05f63ef16513a5c64a2..80bf6fd08ec9476615567b1fb81a2362ee4839c8 100644 (file)
@@ -1539,6 +1539,12 @@ namespace Posix {
        [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
        public int setpriority (int which, int who, int prio);
 
+       [CCode (cname = "struct iovec", cheader_filename = "sys/uio.h")]
+       public struct iovector {
+               public void* iov_base;
+               public size_t iov_len;
+       }
+
        [CCode (cheader_filename = "unistd.h")]
        public int close (int fd);
        [CCode (cheader_filename = "unistd.h")]
@@ -1553,6 +1559,8 @@ namespace Posix {
        public ssize_t pread (int fd, void* buf, size_t count, off_t offset);
        [CCode (cheader_filename = "unistd.h")]
        public ssize_t readlink (string path, char[] buf);
+       [CCode (cheader_filename = "sys/uio.h")]
+       public ssize_t readv (int fd, iovector vector, int iovcnt);
        [CCode (cheader_filename = "unistd.h,sys/types.h")]
        public int setgid (gid_t gid);
        [CCode (cheader_filename = "unistd.h,sys/types.h")]
@@ -1563,6 +1571,8 @@ namespace Posix {
        public ssize_t write (int fd, void* buf, size_t count);
        [CCode (cheader_filename = "unistd.h")]
        public ssize_t pwrite (int fd, void* buf, size_t count, off_t offset);
+       [CCode (cheader_filename = "sys/uio.h")]
+       public ssize_t writev (int fd, iovector vector, int iovcnt);
        [CCode (cheader_filename = "unistd.h")]
        public off_t lseek(int fildes, off_t offset, int whence);