freebsd-ports/games/amphetamine/files/patch-ab
Kirill Ponomarev c64d835b37 - Fix build on non-i386 arch
PR:		ports/63875
Submitted by:	Ports Fury
2004-03-07 16:44:01 +00:00

31 lines
738 B
Text

--- src/Main.cpp.orig Sun Mar 24 17:49:09 2002
+++ src/Main.cpp Mon Mar 1 19:51:09 2004
@@ -1,3 +1,7 @@
+#if defined(__FreeBSD__) && defined(__i386__)
+#include <floatingpoint.h>
+#endif
+
#include "System.hpp"
#include "Appl.hpp"
#include "Clut.hpp"
@@ -75,6 +79,9 @@
my_argv = argv;
if (checkCommandLine()) return 0;
+#if defined(__FreeBSD__) && defined(__i386__)
+ fpsetmask(fpgetmask() & ~(FP_X_DZ|FP_X_INV));
+#endif
gApplication = new CApplication();
gApplication->InitGraphics();
gApplication->LoadData();
@@ -83,5 +90,10 @@
gApplication->Quit();
delete gApplication;
+#if defined(__FreeBSD__) && defined(__i386__)
+ fpresetsticky(FP_X_DZ|FP_X_INV);
+ fpsetmask(FP_X_DZ|FP_X_INV);
+#endif
+
return 0;
}