projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f42fe6c
)
gmappedfile.c: Define S_IFREG on Win32 when it's not available
author
Chun-wei Fan
<fanchunwei@src.gnome.org>
Thu, 22 Sep 2011 14:10:23 +0000
(22:10 +0800)
committer
Chun-wei Fan
<fanchunwei@src.gnome.org>
Fri, 23 Sep 2011 01:36:37 +0000
(09:36 +0800)
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
patch
|
blob
|
history
diff --git
a/glib/gmappedfile.c
b/glib/gmappedfile.c
index
8d7d0fa
..
57af411
100644
(file)
--- 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"