Permalink
Browse files

Fix appveyor

  • Loading branch information...
1 parent 83e5a4a commit e285fb65fd3ce9445e823f6ae0c1bf675918f228 @TimePath TimePath committed with Kangz Jan 16, 2016
Showing with 4 additions and 4 deletions.
  1. +1 −1 daemon/src/common/FileSystem.cpp
  2. +1 −1 daemon/src/common/IPC/Primitives.cpp
  3. +2 −2 daemon/src/common/Util.h
@@ -236,7 +236,7 @@ inline int my_fseek(FILE* fd, offset_t off, int whence)
#endif
}
#ifdef _WIN32
-using my_stat_t = struct _stati64;
+typedef struct _stati64 my_stat_t;
#elif defined(__APPLE__) || defined(__native_client__)
using my_stat_t = struct stat;
#elif defined(__linux__)
@@ -160,7 +160,7 @@ FileHandle FileHandle::FromDesc(const FileDesc& desc)
#endif
#ifdef _WIN32
int modes[] = {O_RDONLY, O_WRONLY | O_TRUNC | O_CREAT, O_WRONLY | O_APPEND | O_CREAT, O_RDWR | O_CREAT};
- int fd = _open_osfhandle(reinterpret_cast<intptr_t>(desc.handle), modes[mode]);
+ int fd = _open_osfhandle(reinterpret_cast<intptr_t>(desc.handle), modes[Util::ordinal(mode)]);
if (fd == -1) {
CloseHandle(desc.handle);
return FileHandle();
@@ -75,14 +75,14 @@ Iter binary_find(Iter begin, Iter end, const T& value, Compare comp)
* Enum to integral
*/
template<class E, class R = typename std::underlying_type<E>::type>
-CONSTEXPR R ordinal(E e) { return static_cast<R>(e); }
+constexpr R ordinal(E e) { return static_cast<R>(e); }
/**
* Integral to enum
* Prefer ordinal, as that's guaranteed to be valid
*/
template<class E, class I = typename std::underlying_type<E>::type>
-CONSTEXPR E enum_cast(I i) { return static_cast<E>(i); }
+constexpr E enum_cast(I i) { return static_cast<E>(i); }
/**
* Enum to string

0 comments on commit e285fb6

Please sign in to comment.