From 6d17cb8002048eb4134776cc419ca5b6a978595c Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 28 Mar 2006 21:18:32 +0000 Subject: [PATCH] Marc Frajola: Here is one patch that to make FlightGear run without floating point exceptions on FreeBSD. Apparently, if we do not ignore floating point exceptions per this patch, there is some occasional condition where the nvidia driver is involved in delivering spurious floating point exceptions to the fgfs process, causing it to core-dump occasionally without the patch. With only this patch, FlightGear will compile and run properly on FreeBSD 6.X as long as the nvidia accelerated driver is installed, modulo proper switches to the SimGear and FlightGear configure script executions. Again, kudos to your team for the great work on the big release push; it is super to see things come together like this! --- src/Main/bootstrap.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index 1984ef27c..f6696081c 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -28,6 +28,8 @@ #if defined(__linux__) && defined(__i386__) # include # include +#elif defined(__FreeBSD__) +# include #endif #include @@ -147,9 +149,12 @@ int main ( int argc, char **argv ) { _bootstrap_OSInit = 0; - // Enable floating-point exceptions for Linux/x86 #if defined(__linux__) && defined(__i386__) + // Enable floating-point exceptions for Linux/x86 initFPE(); +#elif defined(__FreeBSD__) + // Ignore floating-point exceptions on FreeBSD + signal(SIGFPE, SIG_IGN); #endif #if defined(sgi) -- 2.39.5