Open
Description
Heya, when trying to compile oils-for-unix on NetBSD, I'm running into a compilation issue:
In file included from cpp/stdlib.cc:9:
cpp/stdlib.cc:25:6 error: expected unqualified-id before 'sizeof'
25 | bool isinf(double f) {
| ^-----
cpp/stdlib.cc:25:6 error: expected ')' before 'sizeof'
cpp/stdlib.cc:25:6 error: expected ')' before 'sizeof'
cpp/stdlib.cc:25:6 error: expected unqualified-id before 'sizeof'
25 | bool isnan(double f) {
| ^-----
cpp/stdlib.cc:25:6 error: expected ')' before 'sizeof'
cpp/stdlib.cc:25:6 error: expected ')' before 'sizeof'
I could get it to compile with the following patch:
--- cpp/stdlib.cc.orig
+++ cpp/stdlib.cc
@@ -22,12 +22,14 @@ using error:e_die;
namespace match {
+#undef isinf
bool isinf(double f) {
- return ::isinf(f);
+ return math::isinf(f);
}
+#undef isnan
bool isnan(double f) {
- return ::isnan(f);
+ return math::isnan(f);
}
} // namespace math
But I don't think this is the correct way to do it, I don't really have the c++ skills to fix this though.
Version: 0.31.0
OS: Netbsd 10.1.
Metadata
Metadata
Assignees
Labels
No labels