Bug 659794: Define S_ISREG when it is not available

Not all compilers define S_ISREG on Windows, so define it in such
situations
This commit is contained in:
Chun-wei Fan 2011-09-23 11:42:31 +08:00
parent 5ecca0e553
commit 21598c7466

View File

@ -65,6 +65,14 @@
#define MAP_FAILED ((void *) -1)
#endif
#ifdef G_OS_WIN32
#ifndef S_ISREG
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
#endif
struct _GMappedFile
{
gchar *contents;