summaryrefslogtreecommitdiffstats
path: root/src/fs.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2010-07-16 09:58:26 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2010-07-16 09:58:26 +0200
commit4ed874500c66aeb60cb11a0acc081dbc113eec51 (patch)
tree425587d32b7a7e005c37c9c2c941936c0c65c0d6 /src/fs.c
parent0f6f7b770b84bd02d8c94c84ed9da78bc11ba8ca (diff)
downloadlibrcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.gz
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.bz2
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.xz
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.zip
Windows fixes and CMake scripts to build under Windows
Diffstat (limited to 'src/fs.c')
-rw-r--r--src/fs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fs.c b/src/fs.c
index 182a217..2a63302 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -83,7 +83,13 @@ static char *rccCreateFullName(const char *path, const char *filename) {
static int rccIsFile(const char *filename) {
struct stat st;
+#ifdef HAVE_SYS_STAT_H
+# ifdef S_ISREG
if ((!stat(filename,&st))&&(S_ISREG(st.st_mode))) return 1;
+# else /* S_ISREG */
+ if (!stat(filename,&st)) return 1;
+# endif /* S_ISREG */
+#endif /* HAVE_SYS_STAT_H */
return 0;
}