Index: src/src/nvcore/nvcore.h =================================================================== --- src/src/nvcore/nvcore.h (revision 11943) +++ src/src/nvcore/nvcore.h (working copy) @@ -41,6 +41,9 @@ #elif defined POSH_OS_FREEBSD # define NV_OS_FREEBSD 1 # define NV_OS_UNIX 1 +#elif defined POSH_OS_OPENBSD +# define NV_OS_OPENBSD 1 +# define NV_OS_UNIX 1 #elif defined POSH_OS_CYGWIN32 # define NV_OS_CYGWIN 1 #elif defined POSH_OS_MINGW @@ -178,7 +181,7 @@ #elif NV_CC_GNUC # if NV_OS_LINUX # include "DefsGnucLinux.h" -# elif NV_OS_DARWIN || NV_OS_FREEBSD +# elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD # include "DefsGnucDarwin.h" # elif NV_OS_MINGW # include "DefsGnucWin32.h" Index: src/src/nvcore/Debug.cpp =================================================================== --- src/src/nvcore/Debug.cpp (revision 11943) +++ src/src/nvcore/Debug.cpp (working copy) @@ -27,7 +27,7 @@ # include #endif -#if NV_OS_LINUX || NV_OS_DARWIN || NV_OS_FREEBSD +#if NV_OS_LINUX || NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD # include // getpid #endif @@ -38,10 +38,13 @@ # endif #endif -#if NV_OS_DARWIN || NV_OS_FREEBSD +#if NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD # include +# include # include // sysctl -# include +# if !NV_OS_OPENBSD +# include +# endif # undef HAVE_EXECINFO_H # if defined(HAVE_EXECINFO_H) // only after OSX 10.5 # include // backtrace @@ -210,6 +213,14 @@ ucontext_t * ucp = (ucontext_t *)secret; return (void *)ucp->uc_mcontext.mc_eip; # endif +# elif NV_OS_OPENBSD +# if NV_CPU_X86_64 + ucontext_t * ucp = (ucontext_t *)secret; + return (void *)ucp->sc_rip; +# elif NV_CPU_X86 + ucontext_t * ucp = (ucontext_t *)secret; + return (void *)ucp->sc_eip; +# endif # else # if NV_CPU_X86_64 // #define REG_RIP REG_INDEX(rip) // seems to be 16 Index: src/src/nvcore/poshlib/posh.h =================================================================== --- src/src/nvcore/poshlib/posh.h (revision 11943) +++ src/src/nvcore/poshlib/posh.h (working copy) @@ -298,6 +298,11 @@ # define POSH_OS_STRING "FreeBSD" #endif +#if defined __OpenBSD__ +# define POSH_OS_OPENBSD 1 +# define POSH_OS_STRING "OpenBSD" +#endif + #if defined __CYGWIN32__ # define POSH_OS_CYGWIN32 1 # define POSH_OS_STRING "Cygwin" Index: src/src/nvmath/nvmath.h =================================================================== --- src/src/nvmath/nvmath.h (revision 11943) +++ src/src/nvmath/nvmath.h (working copy) @@ -115,7 +115,7 @@ { #if NV_OS_WIN32 return _finite(f) != 0; -#elif NV_OS_DARWIN || NV_OS_FREEBSD +#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD return isfinite(f); #elif NV_OS_LINUX return finitef(f); @@ -130,7 +130,7 @@ { #if NV_OS_WIN32 return _isnan(f) != 0; -#elif NV_OS_DARWIN || NV_OS_FREEBSD +#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD return isnan(f); #elif NV_OS_LINUX return isnanf(f);