[vala] linux.vapi: add more posix extensions and BSDisms:



commit c0ca0125131d8b7e75783d9071191cfdee91b9fb
Author: Michael 'Mickey' Lauer <mickey vanille-media de>
Date:   Sat Oct 24 14:54:56 2009 +0200

    linux.vapi: add more posix extensions and BSDisms:
    * inet_aton(3)
    * openpty(3)
    * forkpty(3)
    * login_tty(3)

 vapi/linux.vapi |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index 525d80b..d935287 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -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 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]