File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121#endif
2222#endif
2323
24- #if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun
24+ #if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun
2525#include <stdlib.h>
2626#include <unistd.h>
2727#include <string.h>
@@ -64,7 +64,7 @@ bool isConsoleColorSupported()
6464{
6565#if _WIN32
6666 return _isatty (_fileno (stderr )) != 0 ;
67- #elif __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun
67+ #elif __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun
6868 const char * term = getenv ("TERM" );
6969 return isatty (STDERR_FILENO ) && term && term [0 ] && 0 != strcmp (term , "dumb" );
7070#else
Original file line number Diff line number Diff line change 1717#include <string>
1818#include <cstdarg>
1919
20- #if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun
20+ #if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun
2121#include <errno.h>
2222#endif
2323
Original file line number Diff line number Diff line change @@ -774,8 +774,10 @@ int Port::isNan(double r)
774774#else
775775 return __inline_isnan (r );
776776#endif
777- #elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __DragonFly__
777+ #elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__
778778 return isnan (r );
779+ #elif__DragonFly__
780+ return __isnand (r );
779781#else
780782 #undef isnan
781783 return std ::isnan (r );
@@ -790,8 +792,10 @@ int Port::isNan(longdouble r)
790792#else
791793 return __inline_isnan (r );
792794#endif
793- #elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __DragonFly__
795+ #elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__
794796 return isnan (r );
797+ #elif__DragonFly__
798+ return __isnanl (r );
795799#else
796800 #undef isnan
797801 return std ::isnan (r );
@@ -818,8 +822,10 @@ int Port::isInfinity(double r)
818822{
819823#if __APPLE__
820824 return fpclassify (r ) == FP_INFINITE ;
821- #elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __DragonFly__
825+ #elif __HAIKU__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__
822826 return isinf (r );
827+ #elif__DragonFly__
828+ return __isinfd (r );
823829#else
824830 #undef isinf
825831 return std ::isinf (r );
@@ -833,7 +839,7 @@ longdouble Port::sqrt(longdouble x)
833839
834840longdouble Port ::fmodl (longdouble x , longdouble y )
835841{
836- #if __FreeBSD__ && __FreeBSD_version < 800000 || __OpenBSD__ || __NetBSD__ || __DragonFly__
842+ #if __FreeBSD__ && __FreeBSD_version < 800000 || __OpenBSD__ || __NetBSD__
837843 return ::fmod (x , y ); // hack for now, fix later
838844#else
839845 return std ::fmod (x , y );
Original file line number Diff line number Diff line change 8585endif ()
8686file (GLOB_RECURSE CORE_D_UNIX ${RUNTIME_DIR} /src/core/sys/posix/*.d )
8787file (GLOB_RECURSE CORE_D_FREEBSD ${RUNTIME_DIR} /src/core/sys/freebsd/*.d )
88+ file (GLOB_RECURSE CORE_D_DRAGONFLYBSD ${RUNTIME_DIR} /src/core/sys/dragonflybsd/*.d )
8889file (GLOB_RECURSE CORE_D_NETBSD ${RUNTIME_DIR} /src/core/sys/netbsd/*.d )
8990file (GLOB_RECURSE CORE_D_LINUX ${RUNTIME_DIR} /src/core/sys/linux/*.d )
9091file (GLOB_RECURSE CORE_D_OSX ${RUNTIME_DIR} /src/core/sys/osx/*.d )
@@ -100,6 +101,10 @@ if(UNIX)
100101 if (${CMAKE_SYSTEM} MATCHES "NetBSD" )
101102 list (APPEND CORE_D_SYS ${CORE_D_NETBSD} )
102103 endif ()
104+ if (${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
105+ message (WARNING , "Adding /src/core/sys/dragonflybsd/ ${CORE_D_DRAGONFLYBSD} " )
106+ list (APPEND CORE_D_SYS ${CORE_D_DRAGONFLYBSD} )
107+ endif ()
103108 if (${CMAKE_SYSTEM} MATCHES "Linux" )
104109 list (APPEND CORE_D_SYS ${CORE_D_LINUX} )
105110 endif ()
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ if(${ptr_size} MATCHES "^4$")
55elseif (${ptr_size} MATCHES "^8$" )
66 set (host_model 64)
77endif ()
8+ find_program (GNUMAKE NAMES gmake make )
89
910function (add_testsuite config_name dflags model )
1011 set (name dmd-testsuite${config_name} )
@@ -17,7 +18,7 @@ function(add_testsuite config_name dflags model)
1718 # testsuite build system provides no way to run the test cases with a
1819 # given set of flags without trying all combinations of them.
1920 add_test (NAME ${name}
20- COMMAND make -k -C ${PROJECT_SOURCE_DIR} /tests/d2/dmd-testsuite RESULTS_DIR=${outdir} DMD=$<TARGET_FILE:ldmd2> DFLAGS=${dflags} MODEL=${model} quick
21+ COMMAND ${GNUMAKE} -k -C ${PROJECT_SOURCE_DIR} /tests/d2/dmd-testsuite RESULTS_DIR=${outdir} DMD=$<TARGET_FILE:ldmd2> DFLAGS=${dflags} MODEL=${model} quick
2122 )
2223 set_tests_properties (${name} PROPERTIES DEPENDS clean-${name} )
2324endfunction ()
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ ifeq (,$(OS))
1515 ifeq (OpenBSD,$(uname_S))
1616 OS: =openbsd
1717 endif
18+ ifeq (DragonFly,$(uname_S))
19+ OS: =dragonflybsd
20+ endif
1821 ifeq (Solaris,$(uname_S))
1922 OS: =solaris
2023 endif
You can’t perform that action at this time.
0 commit comments