diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/geometry.h | 7 | ||||
-rw-r--r-- | include/u.h | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/geometry.h b/include/geometry.h index 274d5b03..a5bcb9ce 100644 --- a/include/geometry.h +++ b/include/geometry.h @@ -59,7 +59,7 @@ Quaternion qadd(Quaternion, Quaternion); Quaternion qsub(Quaternion, Quaternion); Quaternion qneg(Quaternion); Quaternion qmul(Quaternion, Quaternion); -Quaternion qdiv(Quaternion, Quaternion); +Quaternion p9qdiv(Quaternion, Quaternion); Quaternion qunit(Quaternion); Quaternion qinv(Quaternion); double qlen(Quaternion); @@ -94,6 +94,11 @@ Point3 xformpoint(Point3, Space *, Space *); Point3 xformpointd(Point3, Space *, Space *); Point3 xformplane(Point3, Space *, Space *); #define radians(d) ((d)*.01745329251994329572) + +#ifndef NOPLAN9DEFINES +#define qdiv p9qdiv /* for NetBSD */ +#endif + #if defined(__cplusplus) } #endif diff --git a/include/u.h b/include/u.h index 54f4df59..84cd78d0 100644 --- a/include/u.h +++ b/include/u.h @@ -8,6 +8,7 @@ extern "C" { #define __EXTENSIONS__ 1 /* SunOS */ /* NOT USING #define __MAKECONTEXT_V2_SOURCE 1 / * SunOS */ #define _BSD_SOURCE 1 +#define _NETBSD_SOURCE 1 /* NetBSD */ #define _SVID_SOURCE 1 #define _XOPEN_SOURCE 1000 #define _XOPEN_SOURCE_EXTENDED 1 @@ -74,6 +75,13 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)]; # undef _NEEDUSHORT # undef _NEEDUINT # define _NEEDLL 1 +#elif defined(__NetBSD__) +# include <sched.h> +# include <sys/types.h> +# undef _NEEDUSHORT +# undef _NEEDUINT +# undef _NEEDULONG +# undef PLAN9PORT_USING_PTHREADS #else /* No idea what system this is -- try some defaults */ # include <pthread.h> |