aboutsummaryrefslogtreecommitdiff
path: root/butl/filesystem
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-06-29 21:17:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-07-01 16:01:31 +0300
commitbac02200267495741e85db90607186ce4e0593b3 (patch)
treed01cd65d0019a7be916c3c8a5d9f4780f91afdb1 /butl/filesystem
parente0b126d8c7f691856ec4d80bb57cb1ba5c71fd69 (diff)
Port to MSVC
Diffstat (limited to 'butl/filesystem')
-rw-r--r--butl/filesystem11
1 files changed, 9 insertions, 2 deletions
diff --git a/butl/filesystem b/butl/filesystem
index 565f465..780779f 100644
--- a/butl/filesystem
+++ b/butl/filesystem
@@ -5,14 +5,21 @@
#ifndef BUTL_FILESYSTEM
#define BUTL_FILESYSTEM
-#include <sys/types.h> // mode_t
-
#ifndef _WIN32
# include <dirent.h> // DIR
#else
# include <stddef.h> // intptr_t
#endif
+// VC's sys/types.h header file doesn't define mode_t type. So let's define it
+// ourselves according to the POSIX specification.
+//
+#ifndef _MSC_VER
+# include <sys/types.h> // mode_t
+#else
+ typedef int mode_t;
+#endif
+
#include <cstddef> // ptrdiff_t
#include <cstdint> // uint16_t
#include <utility> // move()