[glib/glib-2-30] gmappedfile.c: Define S_IFREG on Win32 when it's not available
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-30] gmappedfile.c: Define S_IFREG on Win32 when it's not available
- Date: Fri, 23 Sep 2011 03:26:14 +0000 (UTC)
commit 10c4ca4db06b99d54bd7192af9d25a1a35b5b02b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Sep 22 22:05:39 2011 +0800
gmappedfile.c: Define S_IFREG on Win32 when it's not available
Make a workaround for S_IFREG in gmappedfile.c on Windows as it may not be
available for a given compiler on that platform
glib/gmappedfile.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/glib/gmappedfile.c b/glib/gmappedfile.c
index f94bf31..2f1fb71 100644
--- a/glib/gmappedfile.c
+++ b/glib/gmappedfile.c
@@ -41,6 +41,10 @@
#define fstat(a,b) _fstati64(a,b)
#define stat _stati64
+#ifndef S_ISREG
+#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
+#endif
+
#endif
#include "gconvert.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]