Add support for Solaris 2.6 on sun4m builds

It is an excellent platform for catching bugs: big-endian, slow enough
that a context switch in the middle of an operation becomes a regular
occurrence, and all that on a SMP box.  Or: I just wanted to see if it
would work.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-07-05 23:15:41 +02:00 committed by eboasson
parent 47920df65c
commit fda285e2f5
52 changed files with 1266 additions and 4197 deletions

View file

@ -0,0 +1,22 @@
#ifndef DDSRT_FIXUP_MATH_H
#define DDSRT_FIXUP_MATH_H
#include_next "math.h"
/* INFINITY, HUGE_VALF, HUGE_VALL are all standard C99, but Solaris 2.6
antedates that by a good margin and GCC's fixed-up headers don't
define it, so we do it here */
#undef HUGE_VAL
#ifdef __GNUC__
# define INFINITY (__builtin_inff ())
# define HUGE_VAL (__builtin_huge_val ())
# define HUGE_VALF (__builtin_huge_valf ())
# define HUGE_VALL (__builtin_huge_vall ())
#else
# define INFINITY 1e10000
# define HUGE_VAL 1e10000
# define HUGE_VALF 1e10000f
# define HUGE_VALL 1e10000L
#endif
#endif /* DDSRT_FIXUP_MATH_H */