Skip to content

Commit 4c8afcd

Browse files
committed
utils/System.*: use fpu_control only on glibc
Bug: vprover/vampire#432 Signed-off-by: Maciej Barć <[email protected]>
1 parent 37158a3 commit 4c8afcd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

minisat/utils/System.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ double Minisat::memUsedPeak(bool /*strictlyPeak*/) { return 0; }
9797

9898
void Minisat::setX86FPUPrecision()
9999
{
100-
#if defined(__linux__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
100+
#if defined(__GLIBC__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
101101
// Only correct FPU precision on Linux architectures that needs and supports it:
102102
fpu_control_t oldcw, newcw;
103103
_FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);

minisat/utils/System.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
2121
#ifndef Minisat_System_h
2222
#define Minisat_System_h
2323

24-
#if defined(__linux__)
24+
#if defined(__GLIBC__)
2525
#include <fpu_control.h>
2626
#endif
2727

0 commit comments

Comments
 (0)