]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix: Add struct passwd, setpwent, getpwent, endpwent
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>
Fri, 10 Apr 2009 07:16:23 +0000 (09:16 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 12 Apr 2009 16:02:18 +0000 (18:02 +0200)
Signed-Off-by: Michael 'Mickey' Lauer <mlauer@vanille-media.de>
vapi/posix.vapi

index 0b55b4f4953cdc45b4ee15638252bd5f94fca856..33619ef748e84ea6d3644da00903ff6dfae3076c 100644 (file)
@@ -324,6 +324,22 @@ namespace Posix {
        [CCode (cheader_filename = "fcntl.h")]
        public int posix_fallocate (int fd, long offset, long len);
 
+       [Compact]
+       [CCode (cname = "struct passwd", cheader_filename = "pwd.h")]
+       public class Passwd {
+               public string pw_name;
+               public string pw_passwd;
+               public uid_t pw_uid;
+               public gid_t pw_gid;
+               public string pw_gecos;
+               public string pw_dir;
+               public string pw_shell;
+       }
+       [CCode (cheader_filename = "pwd.h")]
+       public void endpwent ();
+       public unowned Passwd? getpwent ();
+       public void setpwent ();
+
        [CCode (cheader_filename = "signal.h")]
        public const int SIGABRT;
        [CCode (cheader_filename = "signal.h")]