[PATCH] D146251: [test-suite] Fix FreeBSD and OpenBSD builds

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 18 16:46:07 PDT 2023


dim added a comment.

In D146251#4201293 <https://reviews.llvm.org/D146251#4201293>, @brad wrote:

> Looks like all three OS's have tgmath.h as well. Why not just make this
>
>   #if defined(__MINGW32__)
>   #include <complex.h>
>   #elif defined(__APPLE__)
>   #include <math.h>
>   #else
>   #include <tgmath.h>
>   #endif
>
> For now, unless you can also build test on macOS?

Yes, <tgmath.h> is also available on macOS, but it is unnecessary, even on Linux. Using just <math.h> should be sufficient, because the only math function used is `hypot(3)` which works on doubles by default. There is really no need to pull in the tricky macro machinery from tgmath here.


Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146251/new/

https://reviews.llvm.org/D146251



More information about the llvm-commits mailing list