Skip to content

Commit 11c2fb4

Browse files
committed
Fix to compile LDC on FreeBSD 10.
This fixes issue #584.
1 parent 671f1b8 commit 11c2fb4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

dmd2/root/port.c

+3-7
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,6 @@ PortInitializer::PortInitializer()
590590
#endif
591591
}
592592

593-
#ifndef __HAIKU__
594-
#endif
595593
int Port::isNan(double r)
596594
{
597595
#if __APPLE__
@@ -600,7 +598,7 @@ int Port::isNan(double r)
600598
#else
601599
return __inline_isnan(r);
602600
#endif
603-
#elif __HAIKU__ || __OpenBSD__
601+
#elif __HAIKU__ || __OpenBSD__ || __FreeBSD__
604602
return isnan(r);
605603
#else
606604
#undef isnan
@@ -616,7 +614,7 @@ int Port::isNan(longdouble r)
616614
#else
617615
return __inline_isnan(r);
618616
#endif
619-
#elif __HAIKU__ || __OpenBSD__
617+
#elif __HAIKU__ || __OpenBSD__ || __FreeBSD__
620618
return isnan(r);
621619
#else
622620
#undef isnan
@@ -646,13 +644,11 @@ int Port::isFinite(double r)
646644
return ::finite(r);
647645
}
648646

649-
#if !defined __HAIKU__
650-
#endif
651647
int Port::isInfinity(double r)
652648
{
653649
#if __APPLE__
654650
return fpclassify(r) == FP_INFINITE;
655-
#elif defined __HAIKU__ || __OpenBSD__
651+
#elif defined __HAIKU__ || __OpenBSD__ || __FreeBSD__
656652
return isinf(r);
657653
#else
658654
#undef isinf

0 commit comments

Comments
 (0)