Fix build on DragonFlyBSD

This commit is contained in:
Pierre-Alain TORET 2020-04-20 15:41:11 +02:00 committed by Ethan Lee
parent ac7ee0e959
commit 7328508436
3 changed files with 7 additions and 6 deletions

View File

@ -20,6 +20,7 @@ Contributors
* Thomas Sänger (@HorayNarea) * Thomas Sänger (@HorayNarea)
* Info Teddy (@InfoTeddy) * Info Teddy (@InfoTeddy)
* Alexandra Tildea (@AllyTally) * Alexandra Tildea (@AllyTally)
* Pierre-Alain TORET (@daftaupe)
* leo60228 (@leo60228) * leo60228 (@leo60228)
* Emmanuel Vadot (@evadot) * Emmanuel Vadot (@evadot)
* Rémi Verschelde (@akien-mga) * Rémi Verschelde (@akien-mga)

View File

@ -27,7 +27,7 @@ int mkdir(char* path, int mode)
return CreateDirectoryW(utf16_path, NULL); return CreateDirectoryW(utf16_path, NULL);
} }
#define VNEEDS_MIGRATION (mkdirResult != 0) #define VNEEDS_MIGRATION (mkdirResult != 0)
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) || defined(__DragonFly__)
#include <sys/stat.h> #include <sys/stat.h>
#include <limits.h> #include <limits.h>
#define VNEEDS_MIGRATION (mkdirResult == 0) #define VNEEDS_MIGRATION (mkdirResult == 0)
@ -277,7 +277,7 @@ void PLATFORM_migrateSaveData(char* output)
char oldLocation[MAX_PATH]; char oldLocation[MAX_PATH];
char newLocation[MAX_PATH]; char newLocation[MAX_PATH];
char oldDirectory[MAX_PATH]; char oldDirectory[MAX_PATH];
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) || defined(__DragonFly__)
DIR *dir = NULL; DIR *dir = NULL;
struct dirent *de = NULL; struct dirent *de = NULL;
DIR *subDir = NULL; DIR *subDir = NULL;
@ -290,7 +290,7 @@ void PLATFORM_migrateSaveData(char* output)
return; return;
} }
strcpy(oldDirectory, homeDir); strcpy(oldDirectory, homeDir);
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) #if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) || defined(__DragonFly__)
strcat(oldDirectory, "/.vvvvvv/"); strcat(oldDirectory, "/.vvvvvv/");
#elif defined(__APPLE__) #elif defined(__APPLE__)
strcat(oldDirectory, "/Documents/VVVVVV/"); strcat(oldDirectory, "/Documents/VVVVVV/");
@ -485,7 +485,7 @@ bool FILESYSTEM_openDirectory(const char *dname)
ShellExecute(NULL, "open", dname, NULL, NULL, SW_SHOWMINIMIZED); ShellExecute(NULL, "open", dname, NULL, NULL, SW_SHOWMINIMIZED);
return true; return true;
} }
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) || defined(__DragonFly__)
#ifdef __linux__ #ifdef __linux__
const char* open_cmd = "xdg-open"; const char* open_cmd = "xdg-open";
#else #else

View File

@ -13,7 +13,7 @@
#define STEAM_LIBRARY "steam_api.dll" #define STEAM_LIBRARY "steam_api.dll"
#elif defined(__APPLE__) #elif defined(__APPLE__)
#define STEAM_LIBRARY "libsteam_api.dylib" #define STEAM_LIBRARY "libsteam_api.dylib"
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) || defined(__DragonFly__)
#define STEAM_LIBRARY "libsteam_api.so" #define STEAM_LIBRARY "libsteam_api.so"
#else #else
#error STEAM_LIBRARY: Unrecognized platform! #error STEAM_LIBRARY: Unrecognized platform!
@ -95,7 +95,7 @@ static void ClearPointers()
int32_t STEAM_init() int32_t STEAM_init()
{ {
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) || defined(__DragonFly__)
return 0; return 0;
#endif #endif
intptr_t steamClient; intptr_t steamClient;