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

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 07:15:28 PST 2015


Hi,

I'd prefer if we used CMake to check for the existence of the fpu_control.h
header - we have a proper configure system now, let's use it!

#if defined(__GLIBC__) || HAVE_FPU_CONTROL_H , or something?

Cheers,

James

On Tue, 10 Nov 2015 at 14:46 Daniel Sanders via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151110/53bcb87a/attachment.html>


More information about the llvm-commits mailing list