[glib] Fix build breakage on Unix
- From: Tor Lillqvist <tml src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix build breakage on Unix
- Date: Tue, 30 Mar 2010 17:48:08 +0000 (UTC)
commit f8470ed55ad3bf29cdc8c151b76c4f14b6be928a
Author: Tor Lillqvist <tml iki fi>
Date: Tue Mar 30 20:46:46 2010 +0300
Fix build breakage on Unix
glib/gstdio.h | 50 +++++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/glib/gstdio.h b/glib/gstdio.h
index cc094cb..b92eb6c 100644
--- a/glib/gstdio.h
+++ b/glib/gstdio.h
@@ -27,6 +27,31 @@
G_BEGIN_DECLS
+#if defined (_MSC_VER) && !defined(_WIN64)
+
+/* Make it clear that we mean the struct with 32-bit st_size and
+ * 32-bit st_*time fields as that is how the 32-bit GLib DLL normally
+ * has been compiled. If you get a compiler warning when calling
+ * g_stat(), do take it seriously and make sure that the type of
+ * struct stat the code in GLib fills in matches the struct the type
+ * of struct stat you pass to g_stat(). To avoid hassle, to get file
+ * attributes just use the GIO API instead which doesn't use struct
+ * stat.
+ *
+ * Sure, it would be nicer to use a struct with 64-bit st_size and
+ * 64-bit st_*time fields, but changing that now would break ABI. And
+ * in MinGW, a plain "struct stat" is the one with 32-bit st_size and
+ * st_*time fields.
+ */
+
+typedef struct _stat32 GStatBuf;
+
+#else
+
+typedef struct stat GStatBuf;
+
+#endif
+
#if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX)
/* Just pass on to the system functions, so there's no potential for data
@@ -89,31 +114,6 @@ int g_mkdir (const gchar *filename,
int g_chdir (const gchar *path);
-#if defined (_MSC_VER) && !defined(_WIN64)
-
-/* Make it clear that we mean the struct with 32-bit st_size and
- * 32-bit st_*time fields as that is how the 32-bit GLib DLL normally
- * has been compiled. If you get a compiler warning when calling
- * g_stat(), do take it seriously and make sure that the type of
- * struct stat the code in GLib fills in matches the struct the type
- * of struct stat you pass to g_stat(). To avoid hassle, to get file
- * attributes just use the GIO API instead which doesn't use struct
- * stat.
- *
- * Sure, it would be nicer to use a struct with 64-bit st_size and
- * 64-bit st_*time fields, but changing that now would break ABI. And
- * in MinGW, a plain "struct stat" is the one with 32-bit st_size and
- * st_*time fields.
- */
-
-typedef struct _stat32 GStatBuf;
-
-#else
-
-typedef struct stat GStatBuf;
-
-#endif
-
int g_stat (const gchar *filename,
GStatBuf *buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]