[vala/0.44] glib-2.0: Use 'GStatBuf' as ctype for 'Stat'
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.44] glib-2.0: Use 'GStatBuf' as ctype for 'Stat'
- Date: Sun, 8 Sep 2019 16:23:46 +0000 (UTC)
commit 03a5a9dff9c99064d6ec69236cff6477895d8a46
Author: Jeremy Philippe <jeremy philippe gmail com>
Date: Mon Sep 2 00:47:42 2019 +0200
glib-2.0: Use 'GStatBuf' as ctype for 'Stat'
The documentation of g_stat () states:
In Microsoft's compiler, by default struct stat means one with
64-bit time fields while in MinGW struct stat is the legacy one
with 32-bit fields.
To hopefully clear up this mess, the gstdio.h header defines a
type GStatBuf which is the appropriate struct type depending
on the platform and/or compiler being used. On POSIX it is just
struct stat, but note that even on POSIX platforms, stat() might
be a macro.
vapi/glib-2.0.vapi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index fe1889668..838a6ca06 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -3722,7 +3722,7 @@ namespace GLib {
public static bool close_checked (int fd) throws FileError;
}
- [CCode (cname = "struct stat", cheader_filename = "sys/stat.h,glib/gstdio.h")]
+ [CCode (cname = "GStatBuf", cheader_filename = "glib/gstdio.h")]
public struct Stat {
public time_t st_atime;
public time_t st_mtime;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]