mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 02:25:53 +00:00
Beast fixes for FreeBSD
This commit is contained in:
@@ -40,7 +40,10 @@
|
||||
|
||||
#include <locale>
|
||||
#include <cctype>
|
||||
#include <sys/timeb.h>
|
||||
|
||||
#if ! BEAST_BSD
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
#if ! BEAST_ANDROID
|
||||
#include <cwctype>
|
||||
@@ -85,7 +88,7 @@
|
||||
#include <net/if.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#if ! BEAST_ANDROID
|
||||
#if ! BEAST_ANDROID && ! BEAST_BSD
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -68,11 +68,11 @@
|
||||
#elif BEAST_WINDOWS
|
||||
#if BEAST_MSVC
|
||||
#ifndef _CPPRTTI
|
||||
#error "You're compiling without RTTI enabled! This is needed for a lot of BEAST classes, please update your compiler settings!"
|
||||
#error "Beast requires RTTI!"
|
||||
#endif
|
||||
|
||||
#ifndef _CPPUNWIND
|
||||
#error "You're compiling without exceptions enabled! This is needed for a lot of BEAST classes, please update your compiler settings!"
|
||||
#error "Beast requires RTTI!"
|
||||
#endif
|
||||
|
||||
#pragma warning (push)
|
||||
@@ -161,15 +161,13 @@
|
||||
type##localFunctionName localFunctionName = (type##localFunctionName) dll.getFunction (#functionName);
|
||||
|
||||
//==============================================================================
|
||||
#elif BEAST_LINUX
|
||||
#elif BEAST_LINUX || BEAST_BSD
|
||||
#include <sched.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/dir.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/mman.h>
|
||||
#include <fnmatch.h>
|
||||
@@ -184,12 +182,21 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <signal.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#if BEAST_BSD
|
||||
#include <dirent.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#else
|
||||
#include <sys/dir.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#elif BEAST_ANDROID
|
||||
#include <jni.h>
|
||||
|
||||
@@ -177,7 +177,8 @@ bool File::setAsCurrentWorkingDirectory() const
|
||||
//==============================================================================
|
||||
namespace
|
||||
{
|
||||
#if BEAST_LINUX || (BEAST_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
|
||||
#if BEAST_LINUX || \
|
||||
(BEAST_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
|
||||
typedef struct stat64 beast_statStruct;
|
||||
#define BEAST_STAT stat64
|
||||
#else
|
||||
@@ -1217,7 +1218,11 @@ private:
|
||||
t.tv_sec = (time_t) (time / 1000000000);
|
||||
t.tv_nsec = (long) (time % 1000000000);
|
||||
|
||||
#if BEAST_BSD
|
||||
bassertfalse; // unimplemented
|
||||
#else
|
||||
clock_nanosleep (CLOCK_MONOTONIC, TIMER_ABSTIME, &t, nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
uint64 time, delta;
|
||||
|
||||
@@ -68,7 +68,7 @@ String SystemStats::getStackBacktrace()
|
||||
{
|
||||
String result;
|
||||
|
||||
#if BEAST_ANDROID || BEAST_MINGW
|
||||
#if BEAST_ANDROID || BEAST_MINGW || BEAST_BSD
|
||||
bassertfalse; // sorry, not implemented yet!
|
||||
|
||||
#elif BEAST_WINDOWS
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
#else
|
||||
#define BEAST_MAC 1
|
||||
#endif
|
||||
#elif defined (__FreeBSD__)
|
||||
#define BEAST_BSD 1
|
||||
#else
|
||||
#error "Unknown platform!"
|
||||
#endif
|
||||
@@ -135,7 +137,7 @@
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#if BEAST_LINUX || BEAST_ANDROID
|
||||
#if BEAST_LINUX || BEAST_ANDROID || BEAST_BSD
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define BEAST_DEBUG 1
|
||||
|
||||
Reference in New Issue
Block a user