| @@ -1,15 +1,24 @@ | | | @@ -1,15 +1,24 @@ |
1 | $NetBSD: patch-kccommon.h,v 1.1 2014/11/21 11:29:52 obache Exp $ | | 1 | $NetBSD: patch-kccommon.h,v 1.2 2014/11/24 00:48:18 joerg Exp $ |
2 | | | 2 | |
3 | * NetBSD also missing modfl(3) | | 3 | * NetBSD also missing modfl(3) |
4 | | | 4 | |
5 | --- kccommon.h.orig 2012-05-24 16:27:59.000000000 +0000 | | 5 | --- kccommon.h.orig 2012-05-24 16:27:59.000000000 +0000 |
6 | +++ kccommon.h | | 6 | +++ kccommon.h |
7 | @@ -68,7 +68,7 @@ extern "C" { | | 7 | @@ -68,7 +68,7 @@ extern "C" { |
8 | #define snprintf _snprintf | | 8 | #define snprintf _snprintf |
9 | #endif | | 9 | #endif |
10 | | | 10 | |
11 | -#if defined(__CYGWIN__) | | 11 | -#if defined(__CYGWIN__) |
12 | +#if defined(__CYGWIN__) || defined(__NetBSD__) | | 12 | +#if defined(__CYGWIN__) || defined(__NetBSD__) |
13 | inline long double modfl(long double val, long double* iptr) { | | 13 | inline long double modfl(long double val, long double* iptr) { |
14 | double integ; | | 14 | double integ; |
15 | double fract = std::modf(val, &integ); | | 15 | double fract = std::modf(val, &integ); |
| | | 16 | @@ -82,7 +82,7 @@ using ::modfl; |
| | | 17 | using ::snprintf; |
| | | 18 | } |
| | | 19 | |
| | | 20 | -#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER) |
| | | 21 | +#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER) || defined(_LIBCPP_VERSION) |
| | | 22 | |
| | | 23 | #include <unordered_map> |
| | | 24 | #include <unordered_set> |