mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
netbsd changes
This commit is contained in:
parent
d3da2391ed
commit
556e3a691f
3 changed files with 10 additions and 5 deletions
|
@ -651,7 +651,7 @@ longdouble Port::strtold(const char *p, char **endp)
|
|||
|
||||
#endif
|
||||
|
||||
#if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __HAIKU__
|
||||
#if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __DragonFly__ || __HAIKU__
|
||||
|
||||
#include <math.h>
|
||||
#if __linux__
|
||||
|
@ -806,7 +806,7 @@ int Port::isNan(double r)
|
|||
#else
|
||||
return __inline_isnan(r);
|
||||
#endif
|
||||
#elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__
|
||||
#elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __DragonFly__
|
||||
return isnan(r);
|
||||
#else
|
||||
#undef isnan
|
||||
|
@ -822,7 +822,7 @@ int Port::isNan(longdouble r)
|
|||
#else
|
||||
return __inline_isnan(r);
|
||||
#endif
|
||||
#elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__
|
||||
#elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __DragonFly__
|
||||
return isnan(r);
|
||||
#else
|
||||
#undef isnan
|
||||
|
@ -850,7 +850,7 @@ int Port::isInfinity(double r)
|
|||
{
|
||||
#if __APPLE__
|
||||
return fpclassify(r) == FP_INFINITE;
|
||||
#elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__
|
||||
#elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __DragonFly__
|
||||
return isinf(r);
|
||||
#else
|
||||
#undef isinf
|
||||
|
@ -865,7 +865,7 @@ longdouble Port::sqrt(longdouble x)
|
|||
|
||||
longdouble Port::fmodl(longdouble x, longdouble y)
|
||||
{
|
||||
#if __FreeBSD__ && __FreeBSD_version < 800000 || __OpenBSD__ || __DragonFly__
|
||||
#if __FreeBSD__ && __FreeBSD_version < 800000 || __OpenBSD__ || __NetBSD__ || __DragonFly__
|
||||
return ::fmod(x, y); // hack for now, fix later
|
||||
#else
|
||||
return ::fmodl(x, y);
|
||||
|
|
|
@ -175,6 +175,7 @@ static int linkObjToBinaryGcc(bool sharedLib, bool fullyStatic) {
|
|||
args.push_back("-ldl");
|
||||
// fallthrough
|
||||
case llvm::Triple::FreeBSD:
|
||||
case llvm::Triple::NetBSD:
|
||||
addSoname = true;
|
||||
args.push_back("-lpthread");
|
||||
args.push_back("-lm");
|
||||
|
|
|
@ -83,6 +83,7 @@ else()
|
|||
endif()
|
||||
file(GLOB_RECURSE CORE_D_UNIX ${RUNTIME_DIR}/src/core/sys/posix/*.d)
|
||||
file(GLOB_RECURSE CORE_D_FREEBSD ${RUNTIME_DIR}/src/core/sys/freebsd/*.d)
|
||||
file(GLOB_RECURSE CORE_D_NETBSD ${RUNTIME_DIR}/src/core/sys/netbsd/*.d)
|
||||
file(GLOB_RECURSE CORE_D_LINUX ${RUNTIME_DIR}/src/core/sys/linux/*.d)
|
||||
file(GLOB_RECURSE CORE_D_OSX ${RUNTIME_DIR}/src/core/sys/osx/*.d)
|
||||
file(GLOB_RECURSE CORE_D_SOLARIS ${RUNTIME_DIR}/src/core/sys/solaris/*.d)
|
||||
|
@ -94,6 +95,9 @@ if(UNIX)
|
|||
if(${CMAKE_SYSTEM} MATCHES "FreeBSD")
|
||||
list(APPEND CORE_D_SYS ${CORE_D_FREEBSD})
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM} MATCHES "NetBSD")
|
||||
list(APPEND CORE_D_SYS ${CORE_D_NETBSD})
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM} MATCHES "Linux")
|
||||
list(APPEND CORE_D_SYS ${CORE_D_LINUX})
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue