From dafc8430dcfe6a982d0b3b7b11b7b50ae76dddf3 Mon Sep 17 00:00:00 2001 From: Kimball Thurston Date: Sun, 14 Mar 2021 18:15:31 +1300 Subject: [PATCH] Properly expose header files for float exceptions After moving to Iex, properly expose header files so people can actually use the floating point exception handling code. Further, hide symbols that should be internal to the library Signed-off-by: Kimball Thurston --- src/lib/Iex/CMakeLists.txt | 2 ++ src/lib/Iex/IexMathFloatExc.cpp | 1 + src/lib/Iex/IexMathFloatExc.h | 2 +- src/lib/Iex/IexMathFpu.h | 8 ++++---- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/lib/Iex/CMakeLists.txt b/src/lib/Iex/CMakeLists.txt index d10fe379ed..e72dbf0a7b 100644 --- a/src/lib/Iex/CMakeLists.txt +++ b/src/lib/Iex/CMakeLists.txt @@ -15,6 +15,8 @@ openexr_define_library(Iex IexThrowErrnoExc.h IexErrnoExc.h IexMacros.h + IexMathFloatExc.h + IexMathIeeeExc.h Iex.h IexNamespace.h IexExport.h diff --git a/src/lib/Iex/IexMathFloatExc.cpp b/src/lib/Iex/IexMathFloatExc.cpp index deae36c0fc..03abdb9dae 100644 --- a/src/lib/Iex/IexMathFloatExc.cpp +++ b/src/lib/Iex/IexMathFloatExc.cpp @@ -13,6 +13,7 @@ #include "IexMathFloatExc.h" #include "IexMacros.h" +#include "IexMathExc.h" #include "IexMathFpu.h" #if 0 diff --git a/src/lib/Iex/IexMathFloatExc.h b/src/lib/Iex/IexMathFloatExc.h index 221e32f0ab..89da5aa7bf 100644 --- a/src/lib/Iex/IexMathFloatExc.h +++ b/src/lib/Iex/IexMathFloatExc.h @@ -9,7 +9,7 @@ #include "IexExport.h" #include "IexNamespace.h" -#include "IexMathExc.h" + #include "IexMathIeeeExc.h" IEX_INTERNAL_NAMESPACE_HEADER_ENTER diff --git a/src/lib/Iex/IexMathFpu.h b/src/lib/Iex/IexMathFpu.h index 6ba86f728d..a2cd9c9dba 100644 --- a/src/lib/Iex/IexMathFpu.h +++ b/src/lib/Iex/IexMathFpu.h @@ -24,7 +24,7 @@ IEX_INTERNAL_NAMESPACE_HEADER_ENTER // setFpExceptions() defines which floating // point exceptions cause SIGFPE signals. //----------------------------------------- -IEX_EXPORT + void setFpExceptions (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID)); @@ -32,7 +32,7 @@ void setFpExceptions (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID)); // fpExceptions() tells you which floating // point exceptions cause SIGFPE signals. //---------------------------------------- -IEX_EXPORT + int fpExceptions (); @@ -42,7 +42,7 @@ int fpExceptions (); //------------------------------------------ extern "C" typedef void (* FpExceptionHandler) (int type, const char explanation[]); -IEX_EXPORT + void setFpExceptionHandler (FpExceptionHandler handler); // ----------------------------------------- @@ -53,7 +53,7 @@ void setFpExceptionHandler (FpExceptionHandler handler); // allow trapping of exception register states // that can get set though no SIGFPE occurs. // ----------------------------------------- -IEX_EXPORT + void handleExceptionsSetInRegisters();