All: Some portability fixes

This commit is contained in:
Jeffrey Pfau 2015-06-09 21:22:11 -07:00
parent 67072e649c
commit 97da8b43c9
3 changed files with 7 additions and 5 deletions

View File

@ -160,7 +160,7 @@ if(WIN32)
list(APPEND VFS_SRC ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-fd.c ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-dirent.c)
file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c)
source_group("Windows-specific code" FILES ${OS_SRC})
else()
elseif(UNIX)
add_definitions(-DUSE_PTHREADS)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")

View File

@ -8,13 +8,12 @@
#include "util/common.h"
#ifndef _WIN32
#include <sys/mman.h>
#define PATH_SEP "/"
#else
#ifdef _WIN32
#include <io.h>
#include <windows.h>
#define PATH_SEP "\\"
#else
#define PATH_SEP "/"
#endif
#ifndef PATH_MAX

View File

@ -7,6 +7,9 @@
#include <fcntl.h>
#include <sys/stat.h>
#ifndef _WIN32
#include <sys/mman.h>
#endif
struct VFileFD {
struct VFile d;