summaryrefslogtreecommitdiff
path: root/gio/giomodule.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2010-03-21 20:04:18 +0200
committerTor Lillqvist <tml@iki.fi>2010-03-30 19:22:39 +0300
commit1229281d95802c4c190284c7d331f67194a2553e (patch)
treef4f3b00a31efa65c05120ce80f831f2e48a06133 /gio/giomodule.c
parente7763678b56e3be073cc55d707a6e92fc2055ee0 (diff)
downloadglib-1229281d95802c4c190284c7d331f67194a2553e.tar.gz
glib-1229281d95802c4c190284c7d331f67194a2553e.tar.bz2
glib-1229281d95802c4c190284c7d331f67194a2553e.zip
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.)
Diffstat (limited to 'gio/giomodule.c')
-rw-r--r--gio/giomodule.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gio/giomodule.c b/gio/giomodule.c
index 1f2e0bc2d..3f9203803 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -270,11 +270,7 @@ g_io_modules_scan_all_in_directory (const char *dirname)
const gchar *name;
char *filename;
GDir *dir;
-#ifdef G_OS_WIN32
- struct _g_stat_struct statbuf;
-#else
- struct stat statbuf;
-#endif
+ GStatBuf statbuf;
char *data;
time_t cache_mtime;
GHashTable *cache;