Make FreeBSD handle exceptions like Linux.
authorJostein Kjønigsen <jostein@kjonigsen.net>
Fri, 3 Apr 2015 14:31:41 +0000 (14:31 +0000)
committerJostein Kjønigsen <jostein@kjonigsen.net>
Sun, 5 Apr 2015 18:58:27 +0000 (18:58 +0000)
Addresses https://github.com/dotnet/coreclr/issues/626
.

src/pal/src/exception/seh.cpp

index 788c220..e6f7b7a 100644 (file)
@@ -171,7 +171,7 @@ PAL_ERROR SEHEnable(CPalThread *pthrCurrent)
 {
 #if HAVE_MACH_EXCEPTIONS
     return pthrCurrent->EnableMachExceptions();
-#elif __LINUX__
+#elif __LINUX__ || defined(__FreeBSD__)
     // TODO: This needs to be implemented. Cannot put an ASSERT here
     // because it will make other parts of PAL fail.
     return NO_ERROR;
@@ -200,7 +200,7 @@ PAL_ERROR SEHDisable(CPalThread *pthrCurrent)
     return pthrCurrent->DisableMachExceptions();
     // TODO: This needs to be implemented. Cannot put an ASSERT here
     // because it will make other parts of PAL fail.
-#elif __LINUX__
+#elif __LINUX__ || defined(__FreeBSD__)
     return NO_ERROR;
 #else // HAVE_MACH_EXCEPTIONS
 #error not yet implemented