From 10c4ca4db06b99d54bd7192af9d25a1a35b5b02b Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 22 Sep 2011 22:05:39 +0800 Subject: [PATCH] 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 file changed, 4 insertions(+) diff --git a/glib/gmappedfile.c b/glib/gmappedfile.c index f94bf3104..2f1fb7195 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"