Skip to content

Commit c3968ca

Browse files
authored
Allow building on DragonFly BSD (#167)
1 parent b11e72b commit c3968ca

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ consistently across compilers and operating systems, and in 32-bit and
1414

1515
## Platform support
1616

17-
OpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, and OpenBSD. It
18-
builds with both GCC and clang. Although largely tested and widely
17+
OpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, OpenBSD, and DragonFly BSD.
18+
It builds with both GCC and clang. Although largely tested and widely
1919
used on x86 architectures, openlibm also supports ARM and
2020
powerPC.
2121

src/s_nan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#include "math_private.h"
3838

39-
#if !defined(__APPLE__) && !defined(__FreeBSD__)
39+
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
4040
static __inline int digittoint(int c) {
4141
if ('0' <= c && c <= '9')
4242
return (c - '0');

test/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ include ../Make.inc
33

44
# Set rpath of tests to builddir for loading shared library
55
OPENLIBM_LIB = -L.. -lopenlibm
6-
ifneq (,$(findstring $(OS),Linux FreeBSD))
6+
ifneq ($(OS),WINNT)
7+
ifneq ($(OS),Darwin)
78
OPENLIBM_LIB += -Wl,-rpath=$(OPENLIBM_HOME)
89
endif
10+
endif
911

1012
all: test-double test-float # test-double-system test-float-system
1113

0 commit comments

Comments
 (0)