]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0, posix: Add g_stat, g_lstat, and lstat bindings.
authorEvan Nemerson <evan@coeus-group.com>
Wed, 21 Jul 2010 05:49:50 +0000 (22:49 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Wed, 21 Jul 2010 05:51:58 +0000 (22:51 -0700)
vapi/glib-2.0.vapi
vapi/posix.vapi

index 6e83e394d08ae0e8358a0d96eb5ebe185778175e..a29ec9895044f5ac5e7812d80644d01e751bba19 100644 (file)
@@ -2754,8 +2754,12 @@ namespace GLib {
                public static int close (int fd);
        }
 
-       [CCode (cname = "stat")]
+       [CCode (cname = "struct stat", cheader_filename = "sys/stat.h")]
        public struct Stat {
+               [CCode (cname = "g_stat", instance_pos = -1)]
+               public Stat (string filename);
+               [CCode (cname = "g_lstat", instance_pos = -1)]
+               public Stat.l (string filename);
        }
 
        [Compact]
index b0d1f98a16b829f967cfecd513f2bdecc093ff2f..c080d69f4138098934892ac81983aff9dcee2c2f 100644 (file)
@@ -1381,6 +1381,8 @@ namespace Posix {
        int fstat( int fd, out Stat buf);
        [CCode (cheader_filename = "sys/stat.h")]
        int stat (string filename, out Stat buf);
+       [CCode (cheader_filename = "sys/stat.h")]
+       int lstat (string filename, out Stat buf);
 
        [CCode (cheader_filename = "sys/stat.h")]
        public int chmod (string filename, mode_t mode);