[PATCH] D13935: [minisat] Include the fpu_control.h header only when the __GLIBC__ macro is defined.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 06:18:51 PST 2015


dsanders added a subscriber: dsanders.
dsanders accepted this revision.
dsanders added a reviewer: dsanders.
dsanders added a comment.
This revision is now accepted and ready to land.

LGTM with a (possibly unnecessary) nit


================
Comment at: MultiSource/Applications/minisat/Main.cpp:79
@@ -78,3 +78,3 @@
 
-#if defined(__linux__)
+#if defined(__GLIBC__)
 #include <fpu_control.h>
----------------
You're probably correct here but I don't know much about the non-linux targets that glibc supports (e.g. Hurd). I'd err on the side of caution and test for both `__linux__` and `__GLIBC__`.


http://reviews.llvm.org/D13935





More information about the llvm-commits mailing list