mirror of
https://github.com/minetest/minetest.git
synced 2024-08-19 04:54:18 +02:00
DragonFly BSD is somewhat identical to FreeBSD (#8159)
This commit is contained in:
parent
70672e1cb7
commit
339341ba4e
@ -60,7 +60,7 @@ find_package_handle_standard_args(GetText DEFAULT_MSG ${GETTEXT_REQUIRED_VARS})
|
|||||||
|
|
||||||
if(GETTEXT_FOUND)
|
if(GETTEXT_FOUND)
|
||||||
# BSD variants require special linkage as they don't use glibc
|
# BSD variants require special linkage as they don't use glibc
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD|DragonFly")
|
||||||
set(GETTEXT_LIBRARY "intl")
|
set(GETTEXT_LIBRARY "intl")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -719,11 +719,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} ${OTHER_FLAGS} -Wall -pipe -funroll-loops")
|
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} ${OTHER_FLAGS} -Wall -pipe -funroll-loops")
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
|
if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -fomit-frame-pointer")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -fomit-frame-pointer")
|
||||||
endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
|
endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)")
|
||||||
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
|
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ bool intlGUIEditBox::OnEvent(const SEvent& event)
|
|||||||
break;
|
break;
|
||||||
case EET_KEY_INPUT_EVENT:
|
case EET_KEY_INPUT_EVENT:
|
||||||
{
|
{
|
||||||
#if (defined(__linux__) || defined(__FreeBSD__))
|
#if (defined(__linux__) || defined(__FreeBSD__)) || defined(__DragonFly__)
|
||||||
// ################################################################
|
// ################################################################
|
||||||
// ValkaTR:
|
// ValkaTR:
|
||||||
// This part is the difference from the original intlGUIEditBox
|
// This part is the difference from the original intlGUIEditBox
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#define __BIG_ENDIAN 1
|
#define __BIG_ENDIAN 1
|
||||||
#elif defined(__MACH__) && defined(__APPLE__)
|
#elif defined(__MACH__) && defined(__APPLE__)
|
||||||
#include <machine/endian.h>
|
#include <machine/endian.h>
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#else
|
#else
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
@ -31,7 +31,7 @@ DEALINGS IN THE SOFTWARE.
|
|||||||
// for setName
|
// for setName
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||||
#include <pthread_np.h>
|
#include <pthread_np.h>
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
struct THREADNAME_INFO {
|
struct THREADNAME_INFO {
|
||||||
@ -213,7 +213,7 @@ void Thread::setName(const std::string &name)
|
|||||||
// distributions are still runing 2.11 and previous versions.
|
// distributions are still runing 2.11 and previous versions.
|
||||||
prctl(PR_SET_NAME, name.c_str());
|
prctl(PR_SET_NAME, name.c_str());
|
||||||
|
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||||
|
|
||||||
pthread_set_name_np(pthread_self(), name.c_str());
|
pthread_set_name_np(pthread_self(), name.c_str());
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ bool Thread::bindToProcessor(unsigned int proc_number)
|
|||||||
|
|
||||||
return SetThreadAffinityMask(pthread_gethandle(getThreadHandle()), 1 << proc_number);
|
return SetThreadAffinityMask(pthread_gethandle(getThreadHandle()), 1 << proc_number);
|
||||||
|
|
||||||
#elif __FreeBSD_version >= 702106 || defined(__linux__)
|
#elif __FreeBSD_version >= 702106 || defined(__linux__) || defined(__DragonFly__)
|
||||||
|
|
||||||
cpu_set_t cpuset;
|
cpu_set_t cpuset;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#define __BIG_ENDIAN 1
|
#define __BIG_ENDIAN 1
|
||||||
#elif defined(__MACH__) && defined(__APPLE__)
|
#elif defined(__MACH__) && defined(__APPLE__)
|
||||||
#include <machine/endian.h>
|
#include <machine/endian.h>
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#else
|
#else
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user