From 1229281d95802c4c190284c7d331f67194a2553e Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 21 Mar 2010 20:04:18 +0200 Subject: Define a public documented type for the struct stat used by g_stat() Define GStatBuf as the type used by g_stat() and g_lstat(). Replaces the non-public struct tag _g_stat_struct. Mostly relevant for Windows where there are several variants of stat-style structs. On POSIX, is just another name for struct stat. Actually, also on many POSIX systems there are in fact several variants of struct stat and corresponding stat() and lstat() functions, but as g_stat and g_lstat are normally on POSIX just macros that expand to stat and lstat, this should not cause a problem. It's only when it's the actual g_stat() or g_lstat() implementation inside GLib that gets called that one needs to be sure the passed struct is the same as what GLib expects.) --- gio/glocalfileinfo.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'gio/glocalfileinfo.c') diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index a913e826d..6b5226792 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -96,11 +96,6 @@ #include "gioalias.h" -/* See gstdio.h */ -#ifndef G_OS_WIN32 -#define _g_stat_struct stat -#endif - struct ThumbMD5Context { guint32 buf[4]; guint32 bits[2]; @@ -793,7 +788,7 @@ _g_local_file_info_get_parent_info (const char *dir, GFileAttributeMatcher *attribute_matcher, GLocalParentFileInfo *parent_info) { - struct _g_stat_struct statbuf; + GStatBuf statbuf; int res; parent_info->extra_data = NULL; -- cgit v1.2.1