From c3968ca11fa55dd72f9cb547b2b6c86d18aef5af Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Fri, 22 Sep 2017 13:22:43 -0700 Subject: [PATCH] Allow building on DragonFly BSD (#167) --- README.md | 4 ++-- src/s_nan.c | 2 +- test/Makefile | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 64e7ae5..461e41c 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ consistently across compilers and operating systems, and in 32-bit and ## Platform support -OpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, and OpenBSD. It -builds with both GCC and clang. Although largely tested and widely +OpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, OpenBSD, and DragonFly BSD. +It builds with both GCC and clang. Although largely tested and widely used on x86 architectures, openlibm also supports ARM and powerPC. diff --git a/src/s_nan.c b/src/s_nan.c index d3d745c..3539a82 100644 --- a/src/s_nan.c +++ b/src/s_nan.c @@ -36,7 +36,7 @@ #include "math_private.h" -#if !defined(__APPLE__) && !defined(__FreeBSD__) +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) static __inline int digittoint(int c) { if ('0' <= c && c <= '9') return (c - '0'); diff --git a/test/Makefile b/test/Makefile index 454f39d..0e30ac7 100644 --- a/test/Makefile +++ b/test/Makefile @@ -3,9 +3,11 @@ include ../Make.inc # Set rpath of tests to builddir for loading shared library OPENLIBM_LIB = -L.. -lopenlibm -ifneq (,$(findstring $(OS),Linux FreeBSD)) +ifneq ($(OS),WINNT) +ifneq ($(OS),Darwin) OPENLIBM_LIB += -Wl,-rpath=$(OPENLIBM_HOME) endif +endif all: test-double test-float # test-double-system test-float-system