From: Chun-wei Fan Date: Thu, 22 Sep 2011 14:10:23 +0000 (+0800) Subject: gmappedfile.c: Define S_IFREG on Win32 when it's not available X-Git-Tag: 2.31.0~389 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9958909fb2cf818a24737dc3a90e98e6f2f02910;p=platform%2Fupstream%2Fglib.git 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 --- diff --git a/glib/gmappedfile.c b/glib/gmappedfile.c index 8d7d0fa..57af411 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"