From 0c606fa9b7ceebf81b3127e0665568d24fda3e8c Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 22 Jun 2016 12:15:53 -1000 Subject: [PATCH] Windows Fixes --- driver/amuseconv.cpp | 2 +- lib/DirectoryEnumerator.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/driver/amuseconv.cpp b/driver/amuseconv.cpp index ce0bed3..11db824 100644 --- a/driver/amuseconv.cpp +++ b/driver/amuseconv.cpp @@ -5,7 +5,7 @@ #include #include -static logvisor::Module Log(_S("amuseconv")); +static logvisor::Module Log("amuseconv"); enum ConvType { diff --git a/lib/DirectoryEnumerator.cpp b/lib/DirectoryEnumerator.cpp index 7ab607d..b2d083a 100644 --- a/lib/DirectoryEnumerator.cpp +++ b/lib/DirectoryEnumerator.cpp @@ -1,10 +1,20 @@ #ifdef _WIN32 #include +#include #else -#include #include #endif +#include + +#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + +#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + #include #include "amuse/DirectoryEnumerator.hpp"