[glib] Define fstat() for msvc build



commit 4a50bab276cdbde6387c0dd07666de1879e2d6c9
Author: Hans Breuer <hans breuer org>
Date:   Sat May 30 15:33:14 2009 +0200

    Define fstat() for msvc build
---
 glib/giowin32.c    |    4 ++++
 glib/gkeyfile.c    |    4 ++++
 glib/gmappedfile.c |    5 +++++
 3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/glib/giowin32.c b/glib/giowin32.c
index 7f39547..d638544 100644
--- a/glib/giowin32.c
+++ b/glib/giowin32.c
@@ -81,6 +81,10 @@
 #include <errno.h>
 #include <sys/stat.h>
 
+#ifdef _MSC_VER
+#define fstat(a,b) _fstat(a,b)
+#endif
+
 #include "gstdio.h"
 #include "glibintl.h"
 
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 0ae2587..99aff27 100644
--- a/glib/gkeyfile.c
+++ b/glib/gkeyfile.c
@@ -39,6 +39,10 @@
 #ifdef G_OS_WIN32
 #include <io.h>
 
+#ifdef _MSC_VER
+#define fstat(a,b) _fstat(a,b)
+#endif
+
 #ifndef S_ISREG
 #define S_ISREG(mode) ((mode)&_S_IFREG)
 #endif
diff --git a/glib/gmappedfile.c b/glib/gmappedfile.c
index 1220f41..dc83491 100644
--- a/glib/gmappedfile.c
+++ b/glib/gmappedfile.c
@@ -37,6 +37,11 @@
 #ifdef G_OS_WIN32
 #include <windows.h>
 #include <io.h>
+
+#ifdef _MSC_VER
+#define fstat(a,b) _fstat(a,b)
+#endif
+
 #endif
 
 #include "gconvert.h"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]