all repos — mgba @ 97da8b43c97157d3b27d3a338605ccc4b76647ac

mGBA Game Boy Advance Emulator

All: Some portability fixes
Jeffrey Pfau jeffrey@endrift.com
Tue, 09 Jun 2015 21:22:11 -0700
commit

97da8b43c97157d3b27d3a338605ccc4b76647ac

parent

67072e649ca12ccf8e60e0b76d9c7f21a657a644

3 files changed, 7 insertions(+), 5 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -160,7 +160,7 @@ list(APPEND OS_LIB ws2_32)

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")
M src/util/vfs.hsrc/util/vfs.h

@@ -8,13 +8,12 @@ #define VFS_H

#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
M src/util/vfs/vfs-fd.csrc/util/vfs/vfs-fd.c

@@ -7,6 +7,9 @@ #include "util/vfs.h"

#include <fcntl.h> #include <sys/stat.h> +#ifndef _WIN32 +#include <sys/mman.h> +#endif struct VFileFD { struct VFile d;