xref: /netbsd-src/external/gpl3/gcc/dist/fixincludes/tests/base/math.h (revision 0a3071956a3a9fdebdbf7f338cf2d439b45fc728)
1 /*  DO NOT EDIT THIS FILE.
2 
3     It has been auto-edited by fixincludes from:
4 
5 	"fixinc/tests/inc/math.h"
6 
7     This had to be done to correct non-standard usages in the
8     original, manufacturer supplied header file.  */
9 
10 #ifndef FIXINC_WRAP_MATH_H_MATH_EXCEPTION
11 #define FIXINC_WRAP_MATH_H_MATH_EXCEPTION 1
12 
13 #ifdef __cplusplus
14 #define exception __math_exception
15 #endif
16 
17 
18 #if defined( BROKEN_CABS_CHECK )
19 #ifdef __STDC__
20 
21 #else
22 
23 #endif
24 
25 #endif  /* BROKEN_CABS_CHECK */
26 
27 
28 #if defined( DARWIN_9_LONG_DOUBLE_FUNCS_2_CHECK )
29 #include <architecture/ppc/math.h>
30 #endif  /* DARWIN_9_LONG_DOUBLE_FUNCS_2_CHECK */
31 
32 
33 #if defined( DARWIN_FLT_EVAL_METHOD_CHECK )
34 #if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16
35 #if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == -1 || __FLT_EVAL_METHOD__ == 16
36 #endif  /* DARWIN_FLT_EVAL_METHOD_CHECK */
37 
38 
39 #if defined( HPPA_HPUX_FP_MACROS_CHECK )
40 #endif /* _INCLUDE_HPUX_SOURCE */
41 
42 #if defined(_INCLUDE_HPUX_SOURCE) || \
43    (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
44 #  define FP_NORMAL     0
45 #  define FP_ZERO       1
46 #  define FP_INFINITE   2
47 #  define FP_SUBNORMAL  3
48 #  define FP_NAN        4
49 #endif
50 
51 #ifdef _INCLUDE_HPUX_SOURCE
52 
53 #endif  /* HPPA_HPUX_FP_MACROS_CHECK */
54 
55 
56 #if defined( HPUX11_CPP_POW_INLINE_CHECK )
57 
58 #endif  /* HPUX11_CPP_POW_INLINE_CHECK */
59 
60 
61 #if defined( HPUX_MATH_CONSTEXPR_CHECK )
62 #  define _DINFINITY (__builtin_inf ())
63 #    define _SINFINITY (__builtin_inff ())
64 #    define _SQNAN (__builtin_nanf (""))
65 #endif  /* HPUX_MATH_CONSTEXPR_CHECK */
66 
67 
68 #if defined( HPUX11_FABSF_CHECK )
69 #ifdef _PA_RISC
70 #ifndef __cplusplus
71 #  define fabsf(x) ((float)fabs((double)(float)(x)))
72 #endif
73 #endif
74 #endif  /* HPUX11_FABSF_CHECK */
75 
76 
77 #if defined( HPUX8_BOGUS_INLINES_CHECK )
78 extern "C" int abs(int);
79 
80 #endif  /* HPUX8_BOGUS_INLINES_CHECK */
81 
82 
83 #if defined( MATH_EXCEPTION_CHECK )
84 typedef struct exception t_math_exception;
85 #endif  /* MATH_EXCEPTION_CHECK */
86 
87 
88 #if defined( MATH_HUGE_VAL_FROM_DBL_MAX_CHECK )
89 
90 #define HUGE_VAL 3.1415e+9 /* really big */
91 #endif  /* MATH_HUGE_VAL_FROM_DBL_MAX_CHECK */
92 
93 
94 #if defined( RS6000_DOUBLE_CHECK )
95 #ifndef __cplusplus
96 extern int class();
97 #endif
98 #endif  /* RS6000_DOUBLE_CHECK */
99 
100 
101 #if defined( SOLARIS_MATH_12_CHECK )
102 #if __cplusplus >= 201103L
103 #endif
104 #endif  /* SOLARIS_MATH_12_CHECK */
105 
106 
107 #if defined( STRICT_ANSI_NOT_CTD_CHECK )
108 #if 1 && \
109 && defined(mumbling) |& ( !defined(__STRICT_ANSI__)) \
110 (  !defined(__STRICT_ANSI__) && !defined(_XOPEN_SOURCE) \
111 ||  !defined(__STRICT_ANSI__) ) /* not std C */
112 int foo;
113 #endif
114 #endif  /* STRICT_ANSI_NOT_CTD_CHECK */
115 
116 
117 #if defined( VXWORKS_MATH_H_FP_C99_CHECK )
118 
119 #define HUGE_VAL _ARCH_HUGH_VAL
120 
121 #if _C99
122 
123 #define FP_INFINITE  1
124 #define FP_NAN       2
125 #define FP_NORMAL    (-1)
126 #define FP_SUBNORMAL (-2)
127 #define FP_ZERO      0
128 
129 #define fpclassify(x) \
130   __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, \
131 		       FP_SUBNORMAL, FP_ZERO, (x))
132 
133 #define signbit(x) __builtin_signbit(x)
134 #define isfinite(x) __builtin_isfinite(x)
135 #define isnormal(x) __builtin_isnormal(x)
136 #define isnan(x) __builtin_isnan(x)
137 #define isinf(x) __builtin_isinf(x)
138 
139 #define isgreater(x, y) __builtin_isgreater((x),(y))
140 #define isgreaterequal(x, y) __builtin_isgreaterequal((x),(y))
141 #define isless(x, y) __builtin_isless((x),(y))
142 #define islessequal(x, y) __builtin_islessequal((x),(y))
143 #define islessgreater(x, y) __builtin_islessgreater((x),(y))
144 #define isunordered(x, y) __builtin_isunordered((x),(y))
145 
146 #endif /* _C99 */
147 
148 #endif  /* VXWORKS_MATH_H_FP_C99_CHECK */
149 #ifdef __cplusplus
150 #undef exception
151 #endif
152 
153 #endif  /* FIXINC_WRAP_MATH_H_MATH_EXCEPTION */
154