浏览代码

Allow building on DragonFly BSD (#167)

Alex Arslan 7 年之前
父节点
当前提交
c3968ca11f
共有 3 个文件被更改,包括 6 次插入4 次删除
  1. 2 2
      README.md
  2. 1 1
      src/s_nan.c
  3. 3 1
      test/Makefile

+ 2 - 2
README.md

@@ -14,8 +14,8 @@ consistently across compilers and operating systems, and in 32-bit and
 
 
 ## Platform support
 ## 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
 used on x86 architectures, openlibm also supports ARM and
 powerPC.
 powerPC.
 
 

+ 1 - 1
src/s_nan.c

@@ -36,7 +36,7 @@
 
 
 #include "math_private.h"
 #include "math_private.h"
 
 
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
 static __inline int digittoint(int c) {
 static __inline int digittoint(int c) {
 	if ('0' <= c && c <= '9')
 	if ('0' <= c && c <= '9')
 		return (c - '0');
 		return (c - '0');

+ 3 - 1
test/Makefile

@@ -3,9 +3,11 @@ include ../Make.inc
 
 
 # Set rpath of tests to builddir for loading shared library
 # Set rpath of tests to builddir for loading shared library
 OPENLIBM_LIB = -L.. -lopenlibm
 OPENLIBM_LIB = -L.. -lopenlibm
-ifneq (,$(findstring $(OS),Linux FreeBSD))
+ifneq ($(OS),WINNT)
+ifneq ($(OS),Darwin)
 OPENLIBM_LIB += -Wl,-rpath=$(OPENLIBM_HOME)
 OPENLIBM_LIB += -Wl,-rpath=$(OPENLIBM_HOME)
 endif
 endif
+endif
 
 
 all: test-double test-float # test-double-system test-float-system
 all: test-double test-float # test-double-system test-float-system