]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
linux.vapi: add more posix extensions and BSDisms:
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>
Sat, 24 Oct 2009 12:54:56 +0000 (14:54 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 31 Oct 2009 13:12:58 +0000 (14:12 +0100)
* inet_aton(3)
* openpty(3)
* forkpty(3)
* login_tty(3)

vapi/linux.vapi

index 525d80be531400406cf02e0e56fde0f0a89bd502..d93528746141835b9cfc6cdd092e4c225353d0cd 100644 (file)
@@ -96,6 +96,31 @@ namespace Linux {
     /*
      * Misc non-posix additions
      */
+    [CCode (cheader_filename = "arpa/inet.h")]
+    public int inet_aton(string cp, out Posix.InAddr addr);
+
+    [CCode (cname = "struct winsize", cheader_filename = "termios.h", destroy_function = "")]
+    public struct winsize {
+        public ushort ws_row;
+        public ushort ws_col;
+        public ushort ws_xpixel;
+        public ushort ws_ypixel;
+    }
+
+    [CCode (cheader_filename = "pty.h")]
+    public Posix.pid_t forkpty (out int amaster,
+                                out int aslave,
+                                [CCode (array_length=false, array_null_terminated=true)] char[] name,
+                                Posix.termios? termp,
+                                winsize? winp);
+
+    [CCode (cheader_filename = "pty.h")]
+    public int openpty (out int amaster,
+                        out int aslave,
+                        [CCode (array_length=false, array_null_terminated=true)] char[] name,
+                        Posix.termios? termp,
+                        winsize? winp);
+
     [CCode (cprefix = "CLONE_", cheader_filename = "sched.h")]
     public enum CloneFlags {
         FILES,
@@ -109,6 +134,9 @@ namespace Linux {
     [CCode (cheader_filename = "time.h")]
     public time_t timegm (GLib.Time t);
 
+    [CCode (cheader_filename = "utmp.h")]
+    public int login_tty (int fd);
+
     // mremap(2)
     [CCode (cprefix = "MREMAP_", cheader_filename = "sys/mman.h")]
     public enum MremapFlags {