Commit | Line | Data |
---|---|---|
88b48903 WN |
1 | /* A GNU-like <math.h>. |
2 | ||
5df4cba6 | 3 | Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. |
88b48903 WN |
4 | |
5 | This program is free software: you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
c0c3707f | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
88b48903 WN |
17 | |
18 | #ifndef _@GUARD_PREFIX@_MATH_H | |
19 | ||
20 | #if __GNUC__ >= 3 | |
21 | @PRAGMA_SYSTEM_HEADER@ | |
22 | #endif | |
23 | @PRAGMA_COLUMNS@ | |
24 | ||
25 | /* The include_next requires a split double-inclusion guard. */ | |
26 | #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ | |
27 | ||
28 | #ifndef _@GUARD_PREFIX@_MATH_H | |
29 | #define _@GUARD_PREFIX@_MATH_H | |
30 | ||
c0c3707f CB |
31 | /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */ |
32 | #if defined __VMS && ! defined NAN | |
33 | # include <fp.h> | |
34 | #endif | |
35 | ||
4a626d0a PA |
36 | #ifndef _GL_INLINE_HEADER_BEGIN |
37 | #error "Please include config.h first." | |
38 | #endif | |
88b48903 WN |
39 | _GL_INLINE_HEADER_BEGIN |
40 | #ifndef _GL_MATH_INLINE | |
41 | # define _GL_MATH_INLINE _GL_INLINE | |
42 | #endif | |
43 | ||
44 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | |
45 | ||
46 | /* The definition of _GL_ARG_NONNULL is copied here. */ | |
47 | ||
48 | /* The definition of _GL_WARN_ON_USE is copied here. */ | |
49 | ||
50 | #ifdef __cplusplus | |
51 | /* Helper macros to define type-generic function FUNC as overloaded functions, | |
52 | rather than as macros like in C. POSIX declares these with an argument of | |
53 | real-floating (that is, one of float, double, or long double). */ | |
54 | # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ | |
55 | static inline int \ | |
56 | _gl_cxx_ ## func ## f (float f) \ | |
57 | { \ | |
58 | return func (f); \ | |
59 | } \ | |
60 | static inline int \ | |
61 | _gl_cxx_ ## func ## d (double d) \ | |
62 | { \ | |
63 | return func (d); \ | |
64 | } \ | |
65 | static inline int \ | |
66 | _gl_cxx_ ## func ## l (long double l) \ | |
67 | { \ | |
68 | return func (l); \ | |
69 | } | |
c0c3707f | 70 | # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ |
4c62b19f | 71 | _GL_BEGIN_NAMESPACE \ |
c0c3707f CB |
72 | inline rettype \ |
73 | rpl_func (float f) \ | |
88b48903 WN |
74 | { \ |
75 | return _gl_cxx_ ## func ## f (f); \ | |
76 | } \ | |
c0c3707f CB |
77 | inline rettype \ |
78 | rpl_func (double d) \ | |
88b48903 WN |
79 | { \ |
80 | return _gl_cxx_ ## func ## d (d); \ | |
81 | } \ | |
c0c3707f CB |
82 | inline rettype \ |
83 | rpl_func (long double l) \ | |
88b48903 WN |
84 | { \ |
85 | return _gl_cxx_ ## func ## l (l); \ | |
4c62b19f PA |
86 | } \ |
87 | _GL_END_NAMESPACE | |
88b48903 WN |
88 | #endif |
89 | ||
90 | /* Helper macros to define a portability warning for the | |
91 | classification macro FUNC called with VALUE. POSIX declares the | |
92 | classification macros with an argument of real-floating (that is, | |
93 | one of float, double, or long double). */ | |
94 | #define _GL_WARN_REAL_FLOATING_DECL(func) \ | |
c0c3707f CB |
95 | _GL_MATH_INLINE int \ |
96 | _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ | |
97 | "use gnulib module " #func " for portability") \ | |
98 | rpl_ ## func ## f (float f) \ | |
99 | { \ | |
100 | return func (f); \ | |
101 | } \ | |
102 | _GL_MATH_INLINE int \ | |
103 | _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ | |
104 | "use gnulib module " #func " for portability") \ | |
105 | rpl_ ## func ## d (double d) \ | |
106 | { \ | |
107 | return func (d); \ | |
108 | } \ | |
109 | _GL_MATH_INLINE int \ | |
110 | _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ | |
111 | "use gnulib module " #func " for portability") \ | |
112 | rpl_ ## func ## l (long double l) \ | |
113 | { \ | |
114 | return func (l); \ | |
115 | } | |
88b48903 WN |
116 | #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ |
117 | (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ | |
118 | : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ | |
119 | : rpl_ ## func ## l (value)) | |
120 | ||
121 | ||
122 | #if @REPLACE_ITOLD@ | |
123 | /* Pull in a function that fixes the 'int' to 'long double' conversion | |
124 | of glibc 2.7. */ | |
125 | _GL_EXTERN_C void _Qp_itoq (long double *, int); | |
126 | static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; | |
127 | #endif | |
128 | ||
129 | ||
130 | /* POSIX allows platforms that don't support NAN. But all major | |
131 | machines in the past 15 years have supported something close to | |
132 | IEEE NaN, so we define this unconditionally. We also must define | |
133 | it on platforms like Solaris 10, where NAN is present but defined | |
134 | as a function pointer rather than a floating point constant. */ | |
135 | #if !defined NAN || @REPLACE_NAN@ | |
136 | # if !GNULIB_defined_NAN | |
137 | # undef NAN | |
138 | /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler | |
139 | choke on the expression 0.0 / 0.0. */ | |
140 | # if defined __DECC || defined _MSC_VER | |
141 | _GL_MATH_INLINE float | |
142 | _NaN () | |
143 | { | |
144 | static float zero = 0.0f; | |
145 | return zero / zero; | |
146 | } | |
147 | # define NAN (_NaN()) | |
148 | # else | |
149 | # define NAN (0.0f / 0.0f) | |
150 | # endif | |
151 | # define GNULIB_defined_NAN 1 | |
152 | # endif | |
153 | #endif | |
154 | ||
155 | /* Solaris 10 defines HUGE_VAL, but as a function pointer rather | |
156 | than a floating point constant. */ | |
157 | #if @REPLACE_HUGE_VAL@ | |
158 | # undef HUGE_VALF | |
159 | # define HUGE_VALF (1.0f / 0.0f) | |
160 | # undef HUGE_VAL | |
161 | # define HUGE_VAL (1.0 / 0.0) | |
162 | # undef HUGE_VALL | |
163 | # define HUGE_VALL (1.0L / 0.0L) | |
164 | #endif | |
165 | ||
166 | /* HUGE_VALF is a 'float' Infinity. */ | |
167 | #ifndef HUGE_VALF | |
168 | # if defined _MSC_VER | |
169 | /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ | |
170 | # define HUGE_VALF (1e25f * 1e25f) | |
171 | # else | |
172 | # define HUGE_VALF (1.0f / 0.0f) | |
173 | # endif | |
174 | #endif | |
175 | ||
176 | /* HUGE_VAL is a 'double' Infinity. */ | |
177 | #ifndef HUGE_VAL | |
178 | # if defined _MSC_VER | |
179 | /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ | |
180 | # define HUGE_VAL (1e250 * 1e250) | |
181 | # else | |
182 | # define HUGE_VAL (1.0 / 0.0) | |
183 | # endif | |
184 | #endif | |
185 | ||
186 | /* HUGE_VALL is a 'long double' Infinity. */ | |
187 | #ifndef HUGE_VALL | |
188 | # if defined _MSC_VER | |
189 | /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ | |
190 | # define HUGE_VALL (1e250L * 1e250L) | |
191 | # else | |
192 | # define HUGE_VALL (1.0L / 0.0L) | |
193 | # endif | |
194 | #endif | |
195 | ||
196 | ||
c0c3707f CB |
197 | #if defined FP_ILOGB0 && defined FP_ILOGBNAN |
198 | /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ | |
199 | # if defined __HAIKU__ | |
200 | /* Haiku: match what ilogb() does */ | |
201 | # undef FP_ILOGB0 | |
202 | # undef FP_ILOGBNAN | |
203 | # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ | |
204 | # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ | |
205 | # endif | |
206 | #else | |
207 | /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ | |
88b48903 WN |
208 | # if defined __NetBSD__ || defined __sgi |
209 | /* NetBSD, IRIX 6.5: match what ilogb() does */ | |
210 | # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ | |
211 | # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ | |
212 | # elif defined _AIX | |
213 | /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ | |
214 | # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ | |
215 | # define FP_ILOGBNAN 2147483647 /* INT_MAX */ | |
216 | # elif defined __sun | |
217 | /* Solaris 9: match what ilogb() does */ | |
218 | # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ | |
219 | # define FP_ILOGBNAN 2147483647 /* INT_MAX */ | |
220 | # else | |
221 | /* Gnulib defined values. */ | |
222 | # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ | |
223 | # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ | |
224 | # endif | |
225 | #endif | |
226 | ||
227 | ||
228 | #if @GNULIB_ACOSF@ | |
c0c3707f CB |
229 | # if @REPLACE_ACOSF@ |
230 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
231 | # undef acosf | |
232 | # define acosf rpl_acosf | |
233 | # endif | |
234 | _GL_FUNCDECL_RPL (acosf, float, (float x)); | |
235 | _GL_CXXALIAS_RPL (acosf, float, (float x)); | |
236 | # else | |
237 | # if !@HAVE_ACOSF@ | |
238 | # undef acosf | |
88b48903 | 239 | _GL_FUNCDECL_SYS (acosf, float, (float x)); |
c0c3707f | 240 | # endif |
5e8754f9 | 241 | _GL_CXXALIAS_SYS (acosf, float, (float x)); |
c0c3707f | 242 | # endif |
88b48903 WN |
243 | _GL_CXXALIASWARN (acosf); |
244 | #elif defined GNULIB_POSIXCHECK | |
245 | # undef acosf | |
246 | # if HAVE_RAW_DECL_ACOSF | |
247 | _GL_WARN_ON_USE (acosf, "acosf is unportable - " | |
248 | "use gnulib module acosf for portability"); | |
249 | # endif | |
250 | #endif | |
251 | ||
252 | #if @GNULIB_ACOSL@ | |
253 | # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ | |
254 | # undef acosl | |
255 | _GL_FUNCDECL_SYS (acosl, long double, (long double x)); | |
256 | # endif | |
257 | _GL_CXXALIAS_SYS (acosl, long double, (long double x)); | |
258 | _GL_CXXALIASWARN (acosl); | |
259 | #elif defined GNULIB_POSIXCHECK | |
260 | # undef acosl | |
261 | # if HAVE_RAW_DECL_ACOSL | |
262 | _GL_WARN_ON_USE (acosl, "acosl is unportable - " | |
263 | "use gnulib module acosl for portability"); | |
264 | # endif | |
265 | #endif | |
266 | ||
267 | ||
268 | #if @GNULIB_ASINF@ | |
c0c3707f CB |
269 | # if @REPLACE_ASINF@ |
270 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
271 | # undef asinf | |
272 | # define asinf rpl_asinf | |
273 | # endif | |
274 | _GL_FUNCDECL_RPL (asinf, float, (float x)); | |
275 | _GL_CXXALIAS_RPL (asinf, float, (float x)); | |
276 | # else | |
277 | # if !@HAVE_ASINF@ | |
278 | # undef asinf | |
88b48903 | 279 | _GL_FUNCDECL_SYS (asinf, float, (float x)); |
c0c3707f | 280 | # endif |
5e8754f9 | 281 | _GL_CXXALIAS_SYS (asinf, float, (float x)); |
c0c3707f | 282 | # endif |
88b48903 WN |
283 | _GL_CXXALIASWARN (asinf); |
284 | #elif defined GNULIB_POSIXCHECK | |
285 | # undef asinf | |
286 | # if HAVE_RAW_DECL_ASINF | |
287 | _GL_WARN_ON_USE (asinf, "asinf is unportable - " | |
288 | "use gnulib module asinf for portability"); | |
289 | # endif | |
290 | #endif | |
291 | ||
292 | #if @GNULIB_ASINL@ | |
293 | # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@ | |
294 | # undef asinl | |
295 | _GL_FUNCDECL_SYS (asinl, long double, (long double x)); | |
296 | # endif | |
297 | _GL_CXXALIAS_SYS (asinl, long double, (long double x)); | |
298 | _GL_CXXALIASWARN (asinl); | |
299 | #elif defined GNULIB_POSIXCHECK | |
300 | # undef asinl | |
301 | # if HAVE_RAW_DECL_ASINL | |
302 | _GL_WARN_ON_USE (asinl, "asinl is unportable - " | |
303 | "use gnulib module asinl for portability"); | |
304 | # endif | |
305 | #endif | |
306 | ||
307 | ||
308 | #if @GNULIB_ATANF@ | |
c0c3707f CB |
309 | # if @REPLACE_ATANF@ |
310 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
311 | # undef atanf | |
312 | # define atanf rpl_atanf | |
313 | # endif | |
314 | _GL_FUNCDECL_RPL (atanf, float, (float x)); | |
315 | _GL_CXXALIAS_RPL (atanf, float, (float x)); | |
316 | # else | |
317 | # if !@HAVE_ATANF@ | |
318 | # undef atanf | |
88b48903 | 319 | _GL_FUNCDECL_SYS (atanf, float, (float x)); |
c0c3707f | 320 | # endif |
5e8754f9 | 321 | _GL_CXXALIAS_SYS (atanf, float, (float x)); |
c0c3707f | 322 | # endif |
88b48903 WN |
323 | _GL_CXXALIASWARN (atanf); |
324 | #elif defined GNULIB_POSIXCHECK | |
325 | # undef atanf | |
326 | # if HAVE_RAW_DECL_ATANF | |
327 | _GL_WARN_ON_USE (atanf, "atanf is unportable - " | |
328 | "use gnulib module atanf for portability"); | |
329 | # endif | |
330 | #endif | |
331 | ||
332 | #if @GNULIB_ATANL@ | |
333 | # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@ | |
334 | # undef atanl | |
335 | _GL_FUNCDECL_SYS (atanl, long double, (long double x)); | |
336 | # endif | |
337 | _GL_CXXALIAS_SYS (atanl, long double, (long double x)); | |
338 | _GL_CXXALIASWARN (atanl); | |
339 | #elif defined GNULIB_POSIXCHECK | |
340 | # undef atanl | |
341 | # if HAVE_RAW_DECL_ATANL | |
342 | _GL_WARN_ON_USE (atanl, "atanl is unportable - " | |
343 | "use gnulib module atanl for portability"); | |
344 | # endif | |
345 | #endif | |
346 | ||
347 | ||
348 | #if @GNULIB_ATAN2F@ | |
c0c3707f CB |
349 | # if @REPLACE_ATAN2F@ |
350 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
351 | # undef atan2f | |
352 | # define atan2f rpl_atan2f | |
353 | # endif | |
354 | _GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); | |
355 | _GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); | |
356 | # else | |
357 | # if !@HAVE_ATAN2F@ | |
358 | # undef atan2f | |
88b48903 | 359 | _GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); |
c0c3707f | 360 | # endif |
5e8754f9 | 361 | _GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); |
c0c3707f | 362 | # endif |
88b48903 WN |
363 | _GL_CXXALIASWARN (atan2f); |
364 | #elif defined GNULIB_POSIXCHECK | |
365 | # undef atan2f | |
366 | # if HAVE_RAW_DECL_ATAN2F | |
367 | _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " | |
368 | "use gnulib module atan2f for portability"); | |
369 | # endif | |
370 | #endif | |
371 | ||
372 | ||
373 | #if @GNULIB_CBRTF@ | |
374 | # if @REPLACE_CBRTF@ | |
375 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
376 | # undef cbrtf | |
377 | # define cbrtf rpl_cbrtf | |
378 | # endif | |
379 | _GL_FUNCDECL_RPL (cbrtf, float, (float x)); | |
380 | _GL_CXXALIAS_RPL (cbrtf, float, (float x)); | |
381 | # else | |
382 | # if !@HAVE_DECL_CBRTF@ | |
383 | _GL_FUNCDECL_SYS (cbrtf, float, (float x)); | |
384 | # endif | |
385 | _GL_CXXALIAS_SYS (cbrtf, float, (float x)); | |
386 | # endif | |
387 | _GL_CXXALIASWARN (cbrtf); | |
388 | #elif defined GNULIB_POSIXCHECK | |
389 | # undef cbrtf | |
390 | # if HAVE_RAW_DECL_CBRTF | |
391 | _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " | |
392 | "use gnulib module cbrtf for portability"); | |
393 | # endif | |
394 | #endif | |
395 | ||
396 | #if @GNULIB_CBRT@ | |
397 | # if !@HAVE_CBRT@ | |
398 | _GL_FUNCDECL_SYS (cbrt, double, (double x)); | |
399 | # endif | |
400 | _GL_CXXALIAS_SYS (cbrt, double, (double x)); | |
c0c3707f | 401 | # if __GLIBC__ >= 2 |
88b48903 | 402 | _GL_CXXALIASWARN (cbrt); |
c0c3707f | 403 | # endif |
88b48903 WN |
404 | #elif defined GNULIB_POSIXCHECK |
405 | # undef cbrt | |
406 | # if HAVE_RAW_DECL_CBRT | |
407 | _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " | |
408 | "use gnulib module cbrt for portability"); | |
409 | # endif | |
410 | #endif | |
411 | ||
412 | #if @GNULIB_CBRTL@ | |
413 | # if @REPLACE_CBRTL@ | |
414 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
415 | # undef cbrtl | |
416 | # define cbrtl rpl_cbrtl | |
417 | # endif | |
418 | _GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); | |
419 | _GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); | |
420 | # else | |
421 | # if !@HAVE_DECL_CBRTL@ | |
422 | _GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); | |
423 | # endif | |
424 | _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); | |
425 | # endif | |
426 | _GL_CXXALIASWARN (cbrtl); | |
427 | #elif defined GNULIB_POSIXCHECK | |
428 | # undef cbrtl | |
429 | # if HAVE_RAW_DECL_CBRTL | |
430 | _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " | |
431 | "use gnulib module cbrtl for portability"); | |
432 | # endif | |
433 | #endif | |
434 | ||
435 | ||
436 | #if @GNULIB_CEILF@ | |
437 | # if @REPLACE_CEILF@ | |
438 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
439 | # undef ceilf | |
440 | # define ceilf rpl_ceilf | |
441 | # endif | |
442 | _GL_FUNCDECL_RPL (ceilf, float, (float x)); | |
443 | _GL_CXXALIAS_RPL (ceilf, float, (float x)); | |
444 | # else | |
445 | # if !@HAVE_DECL_CEILF@ | |
446 | # undef ceilf | |
447 | _GL_FUNCDECL_SYS (ceilf, float, (float x)); | |
448 | # endif | |
449 | _GL_CXXALIAS_SYS (ceilf, float, (float x)); | |
450 | # endif | |
451 | _GL_CXXALIASWARN (ceilf); | |
452 | #elif defined GNULIB_POSIXCHECK | |
453 | # undef ceilf | |
454 | # if HAVE_RAW_DECL_CEILF | |
455 | _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " | |
456 | "use gnulib module ceilf for portability"); | |
457 | # endif | |
458 | #endif | |
459 | ||
460 | #if @GNULIB_CEIL@ | |
461 | # if @REPLACE_CEIL@ | |
462 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 463 | # undef ceil |
88b48903 WN |
464 | # define ceil rpl_ceil |
465 | # endif | |
466 | _GL_FUNCDECL_RPL (ceil, double, (double x)); | |
467 | _GL_CXXALIAS_RPL (ceil, double, (double x)); | |
468 | # else | |
469 | _GL_CXXALIAS_SYS (ceil, double, (double x)); | |
470 | # endif | |
c0c3707f | 471 | # if __GLIBC__ >= 2 |
88b48903 | 472 | _GL_CXXALIASWARN (ceil); |
c0c3707f | 473 | # endif |
88b48903 WN |
474 | #endif |
475 | ||
476 | #if @GNULIB_CEILL@ | |
477 | # if @REPLACE_CEILL@ | |
478 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
479 | # undef ceill | |
480 | # define ceill rpl_ceill | |
481 | # endif | |
482 | _GL_FUNCDECL_RPL (ceill, long double, (long double x)); | |
483 | _GL_CXXALIAS_RPL (ceill, long double, (long double x)); | |
484 | # else | |
485 | # if !@HAVE_DECL_CEILL@ | |
486 | # undef ceill | |
487 | _GL_FUNCDECL_SYS (ceill, long double, (long double x)); | |
488 | # endif | |
489 | _GL_CXXALIAS_SYS (ceill, long double, (long double x)); | |
490 | # endif | |
491 | _GL_CXXALIASWARN (ceill); | |
492 | #elif defined GNULIB_POSIXCHECK | |
493 | # undef ceill | |
494 | # if HAVE_RAW_DECL_CEILL | |
495 | _GL_WARN_ON_USE (ceill, "ceill is unportable - " | |
496 | "use gnulib module ceill for portability"); | |
497 | # endif | |
498 | #endif | |
499 | ||
500 | ||
501 | #if @GNULIB_COPYSIGNF@ | |
502 | # if !@HAVE_DECL_COPYSIGNF@ | |
c0c3707f | 503 | # undef copysignf |
88b48903 WN |
504 | _GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); |
505 | # endif | |
506 | _GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); | |
507 | _GL_CXXALIASWARN (copysignf); | |
508 | #elif defined GNULIB_POSIXCHECK | |
509 | # undef copysignf | |
510 | # if HAVE_RAW_DECL_COPYSIGNF | |
511 | _GL_WARN_ON_USE (copysignf, "copysignf is unportable - " | |
512 | "use gnulib module copysignf for portability"); | |
513 | # endif | |
514 | #endif | |
515 | ||
516 | #if @GNULIB_COPYSIGN@ | |
517 | # if !@HAVE_COPYSIGN@ | |
518 | _GL_FUNCDECL_SYS (copysign, double, (double x, double y)); | |
519 | # endif | |
520 | _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); | |
c0c3707f | 521 | # if __GLIBC__ >= 2 |
88b48903 | 522 | _GL_CXXALIASWARN (copysign); |
c0c3707f | 523 | # endif |
88b48903 WN |
524 | #elif defined GNULIB_POSIXCHECK |
525 | # undef copysign | |
526 | # if HAVE_RAW_DECL_COPYSIGN | |
527 | _GL_WARN_ON_USE (copysign, "copysign is unportable - " | |
528 | "use gnulib module copysign for portability"); | |
529 | # endif | |
530 | #endif | |
531 | ||
532 | #if @GNULIB_COPYSIGNL@ | |
533 | # if !@HAVE_COPYSIGNL@ | |
534 | _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); | |
535 | # endif | |
536 | _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); | |
537 | _GL_CXXALIASWARN (copysignl); | |
538 | #elif defined GNULIB_POSIXCHECK | |
539 | # undef copysignl | |
540 | # if HAVE_RAW_DECL_COPYSIGNL | |
541 | _GL_WARN_ON_USE (copysign, "copysignl is unportable - " | |
542 | "use gnulib module copysignl for portability"); | |
543 | # endif | |
544 | #endif | |
545 | ||
546 | ||
547 | #if @GNULIB_COSF@ | |
c0c3707f CB |
548 | # if @REPLACE_COSF@ |
549 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
550 | # undef cosf | |
551 | # define cosf rpl_cosf | |
552 | # endif | |
553 | _GL_FUNCDECL_RPL (cosf, float, (float x)); | |
554 | _GL_CXXALIAS_RPL (cosf, float, (float x)); | |
555 | # else | |
556 | # if !@HAVE_COSF@ | |
557 | # undef cosf | |
88b48903 | 558 | _GL_FUNCDECL_SYS (cosf, float, (float x)); |
c0c3707f | 559 | # endif |
5e8754f9 | 560 | _GL_CXXALIAS_SYS (cosf, float, (float x)); |
c0c3707f | 561 | # endif |
88b48903 WN |
562 | _GL_CXXALIASWARN (cosf); |
563 | #elif defined GNULIB_POSIXCHECK | |
564 | # undef cosf | |
565 | # if HAVE_RAW_DECL_COSF | |
566 | _GL_WARN_ON_USE (cosf, "cosf is unportable - " | |
567 | "use gnulib module cosf for portability"); | |
568 | # endif | |
569 | #endif | |
570 | ||
571 | #if @GNULIB_COSL@ | |
572 | # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ | |
573 | # undef cosl | |
574 | _GL_FUNCDECL_SYS (cosl, long double, (long double x)); | |
575 | # endif | |
576 | _GL_CXXALIAS_SYS (cosl, long double, (long double x)); | |
577 | _GL_CXXALIASWARN (cosl); | |
578 | #elif defined GNULIB_POSIXCHECK | |
579 | # undef cosl | |
580 | # if HAVE_RAW_DECL_COSL | |
581 | _GL_WARN_ON_USE (cosl, "cosl is unportable - " | |
582 | "use gnulib module cosl for portability"); | |
583 | # endif | |
584 | #endif | |
585 | ||
586 | ||
587 | #if @GNULIB_COSHF@ | |
c0c3707f CB |
588 | # if @REPLACE_COSHF@ |
589 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
590 | # undef coshf | |
591 | # define coshf rpl_coshf | |
592 | # endif | |
593 | _GL_FUNCDECL_RPL (coshf, float, (float x)); | |
594 | _GL_CXXALIAS_RPL (coshf, float, (float x)); | |
595 | # else | |
596 | # if !@HAVE_COSHF@ | |
597 | # undef coshf | |
88b48903 | 598 | _GL_FUNCDECL_SYS (coshf, float, (float x)); |
c0c3707f | 599 | # endif |
5e8754f9 | 600 | _GL_CXXALIAS_SYS (coshf, float, (float x)); |
c0c3707f | 601 | # endif |
88b48903 WN |
602 | _GL_CXXALIASWARN (coshf); |
603 | #elif defined GNULIB_POSIXCHECK | |
604 | # undef coshf | |
605 | # if HAVE_RAW_DECL_COSHF | |
606 | _GL_WARN_ON_USE (coshf, "coshf is unportable - " | |
607 | "use gnulib module coshf for portability"); | |
608 | # endif | |
609 | #endif | |
610 | ||
611 | ||
612 | #if @GNULIB_EXPF@ | |
c0c3707f CB |
613 | # if @REPLACE_EXPF@ |
614 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
615 | # undef expf | |
616 | # define expf rpl_expf | |
617 | # endif | |
618 | _GL_FUNCDECL_RPL (expf, float, (float x)); | |
619 | _GL_CXXALIAS_RPL (expf, float, (float x)); | |
620 | # else | |
621 | # if !@HAVE_EXPF@ | |
622 | # undef expf | |
88b48903 | 623 | _GL_FUNCDECL_SYS (expf, float, (float x)); |
c0c3707f | 624 | # endif |
5e8754f9 | 625 | _GL_CXXALIAS_SYS (expf, float, (float x)); |
c0c3707f | 626 | # endif |
88b48903 WN |
627 | _GL_CXXALIASWARN (expf); |
628 | #elif defined GNULIB_POSIXCHECK | |
629 | # undef expf | |
630 | # if HAVE_RAW_DECL_EXPF | |
631 | _GL_WARN_ON_USE (expf, "expf is unportable - " | |
632 | "use gnulib module expf for portability"); | |
633 | # endif | |
634 | #endif | |
635 | ||
636 | #if @GNULIB_EXPL@ | |
c0c3707f CB |
637 | # if @REPLACE_EXPL@ |
638 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
639 | # undef expl | |
640 | # define expl rpl_expl | |
641 | # endif | |
642 | _GL_FUNCDECL_RPL (expl, long double, (long double x)); | |
643 | _GL_CXXALIAS_RPL (expl, long double, (long double x)); | |
644 | # else | |
645 | # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ | |
646 | # undef expl | |
88b48903 | 647 | _GL_FUNCDECL_SYS (expl, long double, (long double x)); |
c0c3707f | 648 | # endif |
88b48903 | 649 | _GL_CXXALIAS_SYS (expl, long double, (long double x)); |
c0c3707f | 650 | # endif |
88b48903 WN |
651 | _GL_CXXALIASWARN (expl); |
652 | #elif defined GNULIB_POSIXCHECK | |
653 | # undef expl | |
654 | # if HAVE_RAW_DECL_EXPL | |
655 | _GL_WARN_ON_USE (expl, "expl is unportable - " | |
656 | "use gnulib module expl for portability"); | |
657 | # endif | |
658 | #endif | |
659 | ||
660 | ||
661 | #if @GNULIB_EXP2F@ | |
662 | # if !@HAVE_DECL_EXP2F@ | |
663 | _GL_FUNCDECL_SYS (exp2f, float, (float x)); | |
664 | # endif | |
665 | _GL_CXXALIAS_SYS (exp2f, float, (float x)); | |
666 | _GL_CXXALIASWARN (exp2f); | |
667 | #elif defined GNULIB_POSIXCHECK | |
668 | # undef exp2f | |
669 | # if HAVE_RAW_DECL_EXP2F | |
670 | _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " | |
671 | "use gnulib module exp2f for portability"); | |
672 | # endif | |
673 | #endif | |
674 | ||
675 | #if @GNULIB_EXP2@ | |
676 | # if @REPLACE_EXP2@ | |
677 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
678 | # undef exp2 | |
679 | # define exp2 rpl_exp2 | |
680 | # endif | |
681 | _GL_FUNCDECL_RPL (exp2, double, (double x)); | |
682 | _GL_CXXALIAS_RPL (exp2, double, (double x)); | |
683 | # else | |
684 | # if !@HAVE_DECL_EXP2@ | |
685 | _GL_FUNCDECL_SYS (exp2, double, (double x)); | |
686 | # endif | |
687 | _GL_CXXALIAS_SYS (exp2, double, (double x)); | |
688 | # endif | |
c0c3707f | 689 | # if __GLIBC__ >= 2 |
88b48903 | 690 | _GL_CXXALIASWARN (exp2); |
c0c3707f | 691 | # endif |
88b48903 WN |
692 | #elif defined GNULIB_POSIXCHECK |
693 | # undef exp2 | |
694 | # if HAVE_RAW_DECL_EXP2 | |
695 | _GL_WARN_ON_USE (exp2, "exp2 is unportable - " | |
696 | "use gnulib module exp2 for portability"); | |
697 | # endif | |
698 | #endif | |
699 | ||
700 | #if @GNULIB_EXP2L@ | |
701 | # if @REPLACE_EXP2L@ | |
702 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
703 | # undef exp2l | |
704 | # define exp2l rpl_exp2l | |
705 | # endif | |
706 | _GL_FUNCDECL_RPL (exp2l, long double, (long double x)); | |
707 | _GL_CXXALIAS_RPL (exp2l, long double, (long double x)); | |
708 | # else | |
709 | # if !@HAVE_DECL_EXP2L@ | |
710 | # undef exp2l | |
711 | _GL_FUNCDECL_SYS (exp2l, long double, (long double x)); | |
712 | # endif | |
713 | _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); | |
714 | # endif | |
715 | _GL_CXXALIASWARN (exp2l); | |
716 | #elif defined GNULIB_POSIXCHECK | |
717 | # undef exp2l | |
718 | # if HAVE_RAW_DECL_EXP2L | |
719 | _GL_WARN_ON_USE (exp2l, "exp2l is unportable - " | |
720 | "use gnulib module exp2l for portability"); | |
721 | # endif | |
722 | #endif | |
723 | ||
724 | ||
725 | #if @GNULIB_EXPM1F@ | |
726 | # if @REPLACE_EXPM1F@ | |
727 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
728 | # undef expm1f | |
729 | # define expm1f rpl_expm1f | |
730 | # endif | |
731 | _GL_FUNCDECL_RPL (expm1f, float, (float x)); | |
732 | _GL_CXXALIAS_RPL (expm1f, float, (float x)); | |
733 | # else | |
734 | # if !@HAVE_EXPM1F@ | |
735 | _GL_FUNCDECL_SYS (expm1f, float, (float x)); | |
736 | # endif | |
737 | _GL_CXXALIAS_SYS (expm1f, float, (float x)); | |
738 | # endif | |
739 | _GL_CXXALIASWARN (expm1f); | |
740 | #elif defined GNULIB_POSIXCHECK | |
741 | # undef expm1f | |
742 | # if HAVE_RAW_DECL_EXPM1F | |
743 | _GL_WARN_ON_USE (expm1f, "expm1f is unportable - " | |
744 | "use gnulib module expm1f for portability"); | |
745 | # endif | |
746 | #endif | |
747 | ||
748 | #if @GNULIB_EXPM1@ | |
749 | # if @REPLACE_EXPM1@ | |
750 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
751 | # undef expm1 | |
752 | # define expm1 rpl_expm1 | |
753 | # endif | |
754 | _GL_FUNCDECL_RPL (expm1, double, (double x)); | |
755 | _GL_CXXALIAS_RPL (expm1, double, (double x)); | |
756 | # else | |
757 | # if !@HAVE_EXPM1@ | |
758 | _GL_FUNCDECL_SYS (expm1, double, (double x)); | |
759 | # endif | |
760 | _GL_CXXALIAS_SYS (expm1, double, (double x)); | |
761 | # endif | |
c0c3707f | 762 | # if __GLIBC__ >= 2 |
88b48903 | 763 | _GL_CXXALIASWARN (expm1); |
c0c3707f | 764 | # endif |
88b48903 WN |
765 | #elif defined GNULIB_POSIXCHECK |
766 | # undef expm1 | |
767 | # if HAVE_RAW_DECL_EXPM1 | |
768 | _GL_WARN_ON_USE (expm1, "expm1 is unportable - " | |
769 | "use gnulib module expm1 for portability"); | |
770 | # endif | |
771 | #endif | |
772 | ||
773 | #if @GNULIB_EXPM1L@ | |
c0c3707f CB |
774 | # if @REPLACE_EXPM1L@ |
775 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
776 | # undef expm1l | |
777 | # define expm1l rpl_expm1l | |
778 | # endif | |
779 | _GL_FUNCDECL_RPL (expm1l, long double, (long double x)); | |
780 | _GL_CXXALIAS_RPL (expm1l, long double, (long double x)); | |
781 | # else | |
782 | # if !@HAVE_DECL_EXPM1L@ | |
783 | # undef expm1l | |
784 | # if !(defined __cplusplus && defined _AIX) | |
88b48903 | 785 | _GL_FUNCDECL_SYS (expm1l, long double, (long double x)); |
c0c3707f CB |
786 | # endif |
787 | # endif | |
88b48903 | 788 | _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); |
c0c3707f | 789 | # endif |
88b48903 WN |
790 | _GL_CXXALIASWARN (expm1l); |
791 | #elif defined GNULIB_POSIXCHECK | |
792 | # undef expm1l | |
793 | # if HAVE_RAW_DECL_EXPM1L | |
794 | _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " | |
795 | "use gnulib module expm1l for portability"); | |
796 | # endif | |
797 | #endif | |
798 | ||
799 | ||
800 | #if @GNULIB_FABSF@ | |
801 | # if !@HAVE_FABSF@ | |
802 | # undef fabsf | |
803 | _GL_FUNCDECL_SYS (fabsf, float, (float x)); | |
804 | # endif | |
805 | _GL_CXXALIAS_SYS (fabsf, float, (float x)); | |
806 | _GL_CXXALIASWARN (fabsf); | |
807 | #elif defined GNULIB_POSIXCHECK | |
808 | # undef fabsf | |
809 | # if HAVE_RAW_DECL_FABSF | |
810 | _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " | |
811 | "use gnulib module fabsf for portability"); | |
812 | # endif | |
813 | #endif | |
814 | ||
815 | #if @GNULIB_FABSL@ | |
816 | # if @REPLACE_FABSL@ | |
817 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
818 | # undef fabsl | |
819 | # define fabsl rpl_fabsl | |
820 | # endif | |
821 | _GL_FUNCDECL_RPL (fabsl, long double, (long double x)); | |
822 | _GL_CXXALIAS_RPL (fabsl, long double, (long double x)); | |
823 | # else | |
824 | # if !@HAVE_FABSL@ | |
825 | # undef fabsl | |
826 | _GL_FUNCDECL_SYS (fabsl, long double, (long double x)); | |
827 | # endif | |
828 | _GL_CXXALIAS_SYS (fabsl, long double, (long double x)); | |
829 | # endif | |
830 | _GL_CXXALIASWARN (fabsl); | |
831 | #elif defined GNULIB_POSIXCHECK | |
832 | # undef fabsl | |
833 | # if HAVE_RAW_DECL_FABSL | |
834 | _GL_WARN_ON_USE (fabsl, "fabsl is unportable - " | |
835 | "use gnulib module fabsl for portability"); | |
836 | # endif | |
837 | #endif | |
838 | ||
839 | ||
840 | #if @GNULIB_FLOORF@ | |
841 | # if @REPLACE_FLOORF@ | |
842 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
843 | # undef floorf | |
844 | # define floorf rpl_floorf | |
845 | # endif | |
846 | _GL_FUNCDECL_RPL (floorf, float, (float x)); | |
847 | _GL_CXXALIAS_RPL (floorf, float, (float x)); | |
848 | # else | |
849 | # if !@HAVE_DECL_FLOORF@ | |
850 | # undef floorf | |
851 | _GL_FUNCDECL_SYS (floorf, float, (float x)); | |
852 | # endif | |
853 | _GL_CXXALIAS_SYS (floorf, float, (float x)); | |
854 | # endif | |
855 | _GL_CXXALIASWARN (floorf); | |
856 | #elif defined GNULIB_POSIXCHECK | |
857 | # undef floorf | |
858 | # if HAVE_RAW_DECL_FLOORF | |
859 | _GL_WARN_ON_USE (floorf, "floorf is unportable - " | |
860 | "use gnulib module floorf for portability"); | |
861 | # endif | |
862 | #endif | |
863 | ||
864 | #if @GNULIB_FLOOR@ | |
865 | # if @REPLACE_FLOOR@ | |
866 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 867 | # undef floor |
88b48903 WN |
868 | # define floor rpl_floor |
869 | # endif | |
870 | _GL_FUNCDECL_RPL (floor, double, (double x)); | |
871 | _GL_CXXALIAS_RPL (floor, double, (double x)); | |
872 | # else | |
873 | _GL_CXXALIAS_SYS (floor, double, (double x)); | |
874 | # endif | |
c0c3707f | 875 | # if __GLIBC__ >= 2 |
88b48903 | 876 | _GL_CXXALIASWARN (floor); |
c0c3707f | 877 | # endif |
88b48903 WN |
878 | #endif |
879 | ||
880 | #if @GNULIB_FLOORL@ | |
881 | # if @REPLACE_FLOORL@ | |
882 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
883 | # undef floorl | |
884 | # define floorl rpl_floorl | |
885 | # endif | |
886 | _GL_FUNCDECL_RPL (floorl, long double, (long double x)); | |
887 | _GL_CXXALIAS_RPL (floorl, long double, (long double x)); | |
888 | # else | |
889 | # if !@HAVE_DECL_FLOORL@ | |
890 | # undef floorl | |
891 | _GL_FUNCDECL_SYS (floorl, long double, (long double x)); | |
892 | # endif | |
893 | _GL_CXXALIAS_SYS (floorl, long double, (long double x)); | |
894 | # endif | |
895 | _GL_CXXALIASWARN (floorl); | |
896 | #elif defined GNULIB_POSIXCHECK | |
897 | # undef floorl | |
898 | # if HAVE_RAW_DECL_FLOORL | |
899 | _GL_WARN_ON_USE (floorl, "floorl is unportable - " | |
900 | "use gnulib module floorl for portability"); | |
901 | # endif | |
902 | #endif | |
903 | ||
904 | ||
905 | #if @GNULIB_FMAF@ | |
906 | # if @REPLACE_FMAF@ | |
907 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
908 | # undef fmaf | |
909 | # define fmaf rpl_fmaf | |
910 | # endif | |
911 | _GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); | |
912 | _GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); | |
913 | # else | |
914 | # if !@HAVE_FMAF@ | |
c0c3707f | 915 | # undef fmaf |
88b48903 WN |
916 | _GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); |
917 | # endif | |
918 | _GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); | |
919 | # endif | |
920 | _GL_CXXALIASWARN (fmaf); | |
921 | #elif defined GNULIB_POSIXCHECK | |
922 | # undef fmaf | |
923 | # if HAVE_RAW_DECL_FMAF | |
924 | _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " | |
925 | "use gnulib module fmaf for portability"); | |
926 | # endif | |
927 | #endif | |
928 | ||
929 | #if @GNULIB_FMA@ | |
930 | # if @REPLACE_FMA@ | |
931 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
932 | # undef fma | |
933 | # define fma rpl_fma | |
934 | # endif | |
935 | _GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); | |
936 | _GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); | |
937 | # else | |
938 | # if !@HAVE_FMA@ | |
c0c3707f | 939 | # undef fma |
88b48903 WN |
940 | _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); |
941 | # endif | |
942 | _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); | |
943 | # endif | |
c0c3707f | 944 | # if __GLIBC__ >= 2 |
88b48903 | 945 | _GL_CXXALIASWARN (fma); |
c0c3707f | 946 | # endif |
88b48903 WN |
947 | #elif defined GNULIB_POSIXCHECK |
948 | # undef fma | |
949 | # if HAVE_RAW_DECL_FMA | |
950 | _GL_WARN_ON_USE (fma, "fma is unportable - " | |
951 | "use gnulib module fma for portability"); | |
952 | # endif | |
953 | #endif | |
954 | ||
955 | #if @GNULIB_FMAL@ | |
956 | # if @REPLACE_FMAL@ | |
957 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
958 | # undef fmal | |
959 | # define fmal rpl_fmal | |
960 | # endif | |
961 | _GL_FUNCDECL_RPL (fmal, long double, | |
962 | (long double x, long double y, long double z)); | |
963 | _GL_CXXALIAS_RPL (fmal, long double, | |
964 | (long double x, long double y, long double z)); | |
965 | # else | |
966 | # if !@HAVE_FMAL@ | |
967 | # undef fmal | |
c0c3707f | 968 | # if !(defined __cplusplus && defined _AIX) |
88b48903 WN |
969 | _GL_FUNCDECL_SYS (fmal, long double, |
970 | (long double x, long double y, long double z)); | |
c0c3707f | 971 | # endif |
88b48903 WN |
972 | # endif |
973 | _GL_CXXALIAS_SYS (fmal, long double, | |
974 | (long double x, long double y, long double z)); | |
975 | # endif | |
976 | _GL_CXXALIASWARN (fmal); | |
977 | #elif defined GNULIB_POSIXCHECK | |
978 | # undef fmal | |
979 | # if HAVE_RAW_DECL_FMAL | |
980 | _GL_WARN_ON_USE (fmal, "fmal is unportable - " | |
981 | "use gnulib module fmal for portability"); | |
982 | # endif | |
983 | #endif | |
984 | ||
985 | ||
986 | #if @GNULIB_FMODF@ | |
987 | # if @REPLACE_FMODF@ | |
988 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
989 | # undef fmodf | |
990 | # define fmodf rpl_fmodf | |
991 | # endif | |
992 | _GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); | |
993 | _GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); | |
994 | # else | |
995 | # if !@HAVE_FMODF@ | |
996 | # undef fmodf | |
997 | _GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); | |
998 | # endif | |
999 | _GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); | |
1000 | # endif | |
1001 | _GL_CXXALIASWARN (fmodf); | |
1002 | #elif defined GNULIB_POSIXCHECK | |
1003 | # undef fmodf | |
1004 | # if HAVE_RAW_DECL_FMODF | |
1005 | _GL_WARN_ON_USE (fmodf, "fmodf is unportable - " | |
1006 | "use gnulib module fmodf for portability"); | |
1007 | # endif | |
1008 | #endif | |
1009 | ||
1010 | #if @GNULIB_FMOD@ | |
1011 | # if @REPLACE_FMOD@ | |
1012 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1013 | # undef fmod | |
1014 | # define fmod rpl_fmod | |
1015 | # endif | |
1016 | _GL_FUNCDECL_RPL (fmod, double, (double x, double y)); | |
1017 | _GL_CXXALIAS_RPL (fmod, double, (double x, double y)); | |
1018 | # else | |
1019 | _GL_CXXALIAS_SYS (fmod, double, (double x, double y)); | |
1020 | # endif | |
c0c3707f | 1021 | # if __GLIBC__ >= 2 |
88b48903 | 1022 | _GL_CXXALIASWARN (fmod); |
c0c3707f | 1023 | # endif |
88b48903 WN |
1024 | #elif defined GNULIB_POSIXCHECK |
1025 | # undef fmod | |
1026 | # if HAVE_RAW_DECL_FMOD | |
1027 | _GL_WARN_ON_USE (fmod, "fmod has portability problems - " | |
1028 | "use gnulib module fmod for portability"); | |
1029 | # endif | |
1030 | #endif | |
1031 | ||
1032 | #if @GNULIB_FMODL@ | |
1033 | # if @REPLACE_FMODL@ | |
1034 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1035 | # undef fmodl | |
1036 | # define fmodl rpl_fmodl | |
1037 | # endif | |
1038 | _GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); | |
1039 | _GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); | |
1040 | # else | |
1041 | # if !@HAVE_FMODL@ | |
1042 | # undef fmodl | |
1043 | _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); | |
1044 | # endif | |
1045 | _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); | |
1046 | # endif | |
1047 | _GL_CXXALIASWARN (fmodl); | |
1048 | #elif defined GNULIB_POSIXCHECK | |
1049 | # undef fmodl | |
1050 | # if HAVE_RAW_DECL_FMODL | |
1051 | _GL_WARN_ON_USE (fmodl, "fmodl is unportable - " | |
1052 | "use gnulib module fmodl for portability"); | |
1053 | # endif | |
1054 | #endif | |
1055 | ||
1056 | ||
1057 | /* Write x as | |
1058 | x = mantissa * 2^exp | |
1059 | where | |
1060 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1061 | If x is zero: mantissa = x, exp = 0. | |
1062 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1063 | Store exp in *EXPPTR and return mantissa. */ | |
1064 | #if @GNULIB_FREXPF@ | |
1065 | # if @REPLACE_FREXPF@ | |
1066 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1067 | # undef frexpf | |
1068 | # define frexpf rpl_frexpf | |
1069 | # endif | |
1070 | _GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1071 | _GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); | |
1072 | # else | |
1073 | # if !@HAVE_FREXPF@ | |
1074 | # undef frexpf | |
1075 | _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1076 | # endif | |
1077 | _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); | |
1078 | # endif | |
1079 | _GL_CXXALIASWARN (frexpf); | |
1080 | #elif defined GNULIB_POSIXCHECK | |
1081 | # undef frexpf | |
1082 | # if HAVE_RAW_DECL_FREXPF | |
1083 | _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " | |
1084 | "use gnulib module frexpf for portability"); | |
1085 | # endif | |
1086 | #endif | |
1087 | ||
1088 | /* Write x as | |
1089 | x = mantissa * 2^exp | |
1090 | where | |
1091 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1092 | If x is zero: mantissa = x, exp = 0. | |
1093 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1094 | Store exp in *EXPPTR and return mantissa. */ | |
1095 | #if @GNULIB_FREXP@ | |
1096 | # if @REPLACE_FREXP@ | |
1097 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 1098 | # undef frexp |
88b48903 WN |
1099 | # define frexp rpl_frexp |
1100 | # endif | |
1101 | _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1102 | _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); | |
1103 | # else | |
1104 | _GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); | |
1105 | # endif | |
c0c3707f | 1106 | # if __GLIBC__ >= 2 |
4c62b19f | 1107 | _GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); |
c0c3707f | 1108 | # endif |
88b48903 WN |
1109 | #elif defined GNULIB_POSIXCHECK |
1110 | # undef frexp | |
1111 | /* Assume frexp is always declared. */ | |
1112 | _GL_WARN_ON_USE (frexp, "frexp is unportable - " | |
1113 | "use gnulib module frexp for portability"); | |
1114 | #endif | |
1115 | ||
1116 | /* Write x as | |
1117 | x = mantissa * 2^exp | |
1118 | where | |
1119 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1120 | If x is zero: mantissa = x, exp = 0. | |
1121 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1122 | Store exp in *EXPPTR and return mantissa. */ | |
1123 | #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ | |
1124 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1125 | # undef frexpl | |
1126 | # define frexpl rpl_frexpl | |
1127 | # endif | |
1128 | _GL_FUNCDECL_RPL (frexpl, long double, | |
1129 | (long double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1130 | _GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); | |
1131 | #else | |
1132 | # if !@HAVE_DECL_FREXPL@ | |
1133 | _GL_FUNCDECL_SYS (frexpl, long double, | |
1134 | (long double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1135 | # endif | |
1136 | # if @GNULIB_FREXPL@ | |
1137 | _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); | |
1138 | # endif | |
1139 | #endif | |
1140 | #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) | |
1141 | _GL_CXXALIASWARN (frexpl); | |
1142 | #endif | |
1143 | #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK | |
1144 | # undef frexpl | |
1145 | # if HAVE_RAW_DECL_FREXPL | |
1146 | _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " | |
1147 | "use gnulib module frexpl for portability"); | |
1148 | # endif | |
1149 | #endif | |
1150 | ||
1151 | ||
1152 | /* Return sqrt(x^2+y^2). */ | |
1153 | #if @GNULIB_HYPOTF@ | |
1154 | # if @REPLACE_HYPOTF@ | |
1155 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1156 | # undef hypotf | |
1157 | # define hypotf rpl_hypotf | |
1158 | # endif | |
1159 | _GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); | |
1160 | _GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); | |
1161 | # else | |
1162 | # if !@HAVE_HYPOTF@ | |
1163 | _GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); | |
1164 | # endif | |
1165 | _GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); | |
1166 | # endif | |
1167 | _GL_CXXALIASWARN (hypotf); | |
1168 | #elif defined GNULIB_POSIXCHECK | |
1169 | # undef hypotf | |
1170 | # if HAVE_RAW_DECL_HYPOTF | |
1171 | _GL_WARN_ON_USE (hypotf, "hypotf is unportable - " | |
1172 | "use gnulib module hypotf for portability"); | |
1173 | # endif | |
1174 | #endif | |
1175 | ||
1176 | /* Return sqrt(x^2+y^2). */ | |
1177 | #if @GNULIB_HYPOT@ | |
1178 | # if @REPLACE_HYPOT@ | |
1179 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1180 | # undef hypot | |
1181 | # define hypot rpl_hypot | |
1182 | # endif | |
1183 | _GL_FUNCDECL_RPL (hypot, double, (double x, double y)); | |
1184 | _GL_CXXALIAS_RPL (hypot, double, (double x, double y)); | |
1185 | # else | |
1186 | _GL_CXXALIAS_SYS (hypot, double, (double x, double y)); | |
1187 | # endif | |
c0c3707f | 1188 | # if __GLIBC__ >= 2 |
88b48903 | 1189 | _GL_CXXALIASWARN (hypot); |
c0c3707f | 1190 | # endif |
88b48903 WN |
1191 | #elif defined GNULIB_POSIXCHECK |
1192 | # undef hypot | |
1193 | # if HAVE_RAW_DECL_HYPOT | |
1194 | _GL_WARN_ON_USE (hypotf, "hypot has portability problems - " | |
1195 | "use gnulib module hypot for portability"); | |
1196 | # endif | |
1197 | #endif | |
1198 | ||
1199 | /* Return sqrt(x^2+y^2). */ | |
1200 | #if @GNULIB_HYPOTL@ | |
1201 | # if @REPLACE_HYPOTL@ | |
1202 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1203 | # undef hypotl | |
1204 | # define hypotl rpl_hypotl | |
1205 | # endif | |
1206 | _GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); | |
1207 | _GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); | |
1208 | # else | |
1209 | # if !@HAVE_HYPOTL@ | |
1210 | _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); | |
1211 | # endif | |
1212 | _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); | |
1213 | # endif | |
1214 | _GL_CXXALIASWARN (hypotl); | |
1215 | #elif defined GNULIB_POSIXCHECK | |
1216 | # undef hypotl | |
1217 | # if HAVE_RAW_DECL_HYPOTL | |
1218 | _GL_WARN_ON_USE (hypotl, "hypotl is unportable - " | |
1219 | "use gnulib module hypotl for portability"); | |
1220 | # endif | |
1221 | #endif | |
1222 | ||
1223 | ||
1224 | #if @GNULIB_ILOGBF@ | |
1225 | # if @REPLACE_ILOGBF@ | |
1226 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1227 | # undef ilogbf | |
1228 | # define ilogbf rpl_ilogbf | |
1229 | # endif | |
1230 | _GL_FUNCDECL_RPL (ilogbf, int, (float x)); | |
1231 | _GL_CXXALIAS_RPL (ilogbf, int, (float x)); | |
1232 | # else | |
1233 | # if !@HAVE_ILOGBF@ | |
1234 | _GL_FUNCDECL_SYS (ilogbf, int, (float x)); | |
1235 | # endif | |
1236 | _GL_CXXALIAS_SYS (ilogbf, int, (float x)); | |
1237 | # endif | |
1238 | _GL_CXXALIASWARN (ilogbf); | |
1239 | #elif defined GNULIB_POSIXCHECK | |
1240 | # undef ilogbf | |
1241 | # if HAVE_RAW_DECL_ILOGBF | |
1242 | _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " | |
1243 | "use gnulib module ilogbf for portability"); | |
1244 | # endif | |
1245 | #endif | |
1246 | ||
1247 | #if @GNULIB_ILOGB@ | |
1248 | # if @REPLACE_ILOGB@ | |
1249 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1250 | # undef ilogb | |
1251 | # define ilogb rpl_ilogb | |
1252 | # endif | |
1253 | _GL_FUNCDECL_RPL (ilogb, int, (double x)); | |
1254 | _GL_CXXALIAS_RPL (ilogb, int, (double x)); | |
1255 | # else | |
1256 | # if !@HAVE_ILOGB@ | |
1257 | _GL_FUNCDECL_SYS (ilogb, int, (double x)); | |
1258 | # endif | |
1259 | _GL_CXXALIAS_SYS (ilogb, int, (double x)); | |
1260 | # endif | |
c0c3707f | 1261 | # if __GLIBC__ >= 2 |
88b48903 | 1262 | _GL_CXXALIASWARN (ilogb); |
c0c3707f | 1263 | # endif |
88b48903 WN |
1264 | #elif defined GNULIB_POSIXCHECK |
1265 | # undef ilogb | |
1266 | # if HAVE_RAW_DECL_ILOGB | |
1267 | _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " | |
1268 | "use gnulib module ilogb for portability"); | |
1269 | # endif | |
1270 | #endif | |
1271 | ||
1272 | #if @GNULIB_ILOGBL@ | |
c0c3707f CB |
1273 | # if @REPLACE_ILOGBL@ |
1274 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1275 | # undef ilogbl | |
1276 | # define ilogbl rpl_ilogbl | |
1277 | # endif | |
1278 | _GL_FUNCDECL_RPL (ilogbl, int, (long double x)); | |
1279 | _GL_CXXALIAS_RPL (ilogbl, int, (long double x)); | |
1280 | # else | |
1281 | # if !@HAVE_ILOGBL@ | |
88b48903 | 1282 | _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); |
c0c3707f | 1283 | # endif |
5e8754f9 | 1284 | _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); |
c0c3707f | 1285 | # endif |
88b48903 WN |
1286 | _GL_CXXALIASWARN (ilogbl); |
1287 | #elif defined GNULIB_POSIXCHECK | |
1288 | # undef ilogbl | |
1289 | # if HAVE_RAW_DECL_ILOGBL | |
1290 | _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " | |
1291 | "use gnulib module ilogbl for portability"); | |
1292 | # endif | |
1293 | #endif | |
1294 | ||
1295 | ||
1296 | /* Return x * 2^exp. */ | |
1297 | #if @GNULIB_LDEXPF@ | |
1298 | # if !@HAVE_LDEXPF@ | |
1299 | # undef ldexpf | |
1300 | _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); | |
1301 | # endif | |
1302 | _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); | |
1303 | _GL_CXXALIASWARN (ldexpf); | |
1304 | #elif defined GNULIB_POSIXCHECK | |
1305 | # undef ldexpf | |
1306 | # if HAVE_RAW_DECL_LDEXPF | |
1307 | _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " | |
1308 | "use gnulib module ldexpf for portability"); | |
1309 | # endif | |
1310 | #endif | |
1311 | ||
1312 | /* Return x * 2^exp. */ | |
1313 | #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ | |
1314 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1315 | # undef ldexpl | |
1316 | # define ldexpl rpl_ldexpl | |
1317 | # endif | |
1318 | _GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); | |
1319 | _GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); | |
1320 | #else | |
1321 | # if !@HAVE_DECL_LDEXPL@ | |
1322 | _GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); | |
1323 | # endif | |
1324 | # if @GNULIB_LDEXPL@ | |
1325 | _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); | |
1326 | # endif | |
1327 | #endif | |
1328 | #if @GNULIB_LDEXPL@ | |
1329 | _GL_CXXALIASWARN (ldexpl); | |
1330 | #endif | |
1331 | #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK | |
1332 | # undef ldexpl | |
1333 | # if HAVE_RAW_DECL_LDEXPL | |
1334 | _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " | |
1335 | "use gnulib module ldexpl for portability"); | |
1336 | # endif | |
1337 | #endif | |
1338 | ||
1339 | ||
1340 | #if @GNULIB_LOGF@ | |
1341 | # if @REPLACE_LOGF@ | |
1342 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1343 | # undef logf | |
1344 | # define logf rpl_logf | |
1345 | # endif | |
1346 | _GL_FUNCDECL_RPL (logf, float, (float x)); | |
1347 | _GL_CXXALIAS_RPL (logf, float, (float x)); | |
1348 | # else | |
1349 | # if !@HAVE_LOGF@ | |
1350 | # undef logf | |
1351 | _GL_FUNCDECL_SYS (logf, float, (float x)); | |
1352 | # endif | |
1353 | _GL_CXXALIAS_SYS (logf, float, (float x)); | |
1354 | # endif | |
1355 | _GL_CXXALIASWARN (logf); | |
1356 | #elif defined GNULIB_POSIXCHECK | |
1357 | # undef logf | |
1358 | # if HAVE_RAW_DECL_LOGF | |
1359 | _GL_WARN_ON_USE (logf, "logf is unportable - " | |
1360 | "use gnulib module logf for portability"); | |
1361 | # endif | |
1362 | #endif | |
1363 | ||
1364 | #if @GNULIB_LOG@ | |
1365 | # if @REPLACE_LOG@ | |
1366 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1367 | # undef log | |
1368 | # define log rpl_log | |
1369 | # endif | |
1370 | _GL_FUNCDECL_RPL (log, double, (double x)); | |
1371 | _GL_CXXALIAS_RPL (log, double, (double x)); | |
1372 | # else | |
1373 | _GL_CXXALIAS_SYS (log, double, (double x)); | |
1374 | # endif | |
c0c3707f | 1375 | # if __GLIBC__ >= 2 |
88b48903 | 1376 | _GL_CXXALIASWARN (log); |
c0c3707f | 1377 | # endif |
88b48903 WN |
1378 | #elif defined GNULIB_POSIXCHECK |
1379 | # undef log | |
1380 | # if HAVE_RAW_DECL_LOG | |
1381 | _GL_WARN_ON_USE (log, "log has portability problems - " | |
1382 | "use gnulib module log for portability"); | |
1383 | # endif | |
1384 | #endif | |
1385 | ||
1386 | #if @GNULIB_LOGL@ | |
1387 | # if @REPLACE_LOGL@ | |
1388 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1389 | # undef logl | |
1390 | # define logl rpl_logl | |
1391 | # endif | |
1392 | _GL_FUNCDECL_RPL (logl, long double, (long double x)); | |
1393 | _GL_CXXALIAS_RPL (logl, long double, (long double x)); | |
1394 | # else | |
1395 | # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ | |
1396 | # undef logl | |
1397 | _GL_FUNCDECL_SYS (logl, long double, (long double x)); | |
1398 | # endif | |
1399 | _GL_CXXALIAS_SYS (logl, long double, (long double x)); | |
1400 | # endif | |
1401 | _GL_CXXALIASWARN (logl); | |
1402 | #elif defined GNULIB_POSIXCHECK | |
1403 | # undef logl | |
1404 | # if HAVE_RAW_DECL_LOGL | |
1405 | _GL_WARN_ON_USE (logl, "logl is unportable - " | |
1406 | "use gnulib module logl for portability"); | |
1407 | # endif | |
1408 | #endif | |
1409 | ||
1410 | ||
1411 | #if @GNULIB_LOG10F@ | |
1412 | # if @REPLACE_LOG10F@ | |
1413 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1414 | # undef log10f | |
1415 | # define log10f rpl_log10f | |
1416 | # endif | |
1417 | _GL_FUNCDECL_RPL (log10f, float, (float x)); | |
1418 | _GL_CXXALIAS_RPL (log10f, float, (float x)); | |
1419 | # else | |
1420 | # if !@HAVE_LOG10F@ | |
1421 | # undef log10f | |
1422 | _GL_FUNCDECL_SYS (log10f, float, (float x)); | |
1423 | # endif | |
1424 | _GL_CXXALIAS_SYS (log10f, float, (float x)); | |
1425 | # endif | |
1426 | _GL_CXXALIASWARN (log10f); | |
1427 | #elif defined GNULIB_POSIXCHECK | |
1428 | # undef log10f | |
1429 | # if HAVE_RAW_DECL_LOG10F | |
1430 | _GL_WARN_ON_USE (log10f, "log10f is unportable - " | |
1431 | "use gnulib module log10f for portability"); | |
1432 | # endif | |
1433 | #endif | |
1434 | ||
1435 | #if @GNULIB_LOG10@ | |
1436 | # if @REPLACE_LOG10@ | |
1437 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1438 | # undef log10 | |
1439 | # define log10 rpl_log10 | |
1440 | # endif | |
1441 | _GL_FUNCDECL_RPL (log10, double, (double x)); | |
1442 | _GL_CXXALIAS_RPL (log10, double, (double x)); | |
1443 | # else | |
1444 | _GL_CXXALIAS_SYS (log10, double, (double x)); | |
1445 | # endif | |
c0c3707f | 1446 | # if __GLIBC__ >= 2 |
88b48903 | 1447 | _GL_CXXALIASWARN (log10); |
c0c3707f | 1448 | # endif |
88b48903 WN |
1449 | #elif defined GNULIB_POSIXCHECK |
1450 | # undef log10 | |
1451 | # if HAVE_RAW_DECL_LOG10 | |
1452 | _GL_WARN_ON_USE (log10, "log10 has portability problems - " | |
1453 | "use gnulib module log10 for portability"); | |
1454 | # endif | |
1455 | #endif | |
1456 | ||
1457 | #if @GNULIB_LOG10L@ | |
1458 | # if @REPLACE_LOG10L@ | |
1459 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1460 | # undef log10l | |
1461 | # define log10l rpl_log10l | |
1462 | # endif | |
1463 | _GL_FUNCDECL_RPL (log10l, long double, (long double x)); | |
1464 | _GL_CXXALIAS_RPL (log10l, long double, (long double x)); | |
1465 | # else | |
1466 | # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@ | |
1467 | # undef log10l | |
1468 | _GL_FUNCDECL_SYS (log10l, long double, (long double x)); | |
1469 | # endif | |
1470 | _GL_CXXALIAS_SYS (log10l, long double, (long double x)); | |
1471 | # endif | |
1472 | _GL_CXXALIASWARN (log10l); | |
1473 | #elif defined GNULIB_POSIXCHECK | |
1474 | # undef log10l | |
1475 | # if HAVE_RAW_DECL_LOG10L | |
1476 | _GL_WARN_ON_USE (log10l, "log10l is unportable - " | |
1477 | "use gnulib module log10l for portability"); | |
1478 | # endif | |
1479 | #endif | |
1480 | ||
1481 | ||
1482 | #if @GNULIB_LOG1PF@ | |
1483 | # if @REPLACE_LOG1PF@ | |
1484 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1485 | # undef log1pf | |
1486 | # define log1pf rpl_log1pf | |
1487 | # endif | |
1488 | _GL_FUNCDECL_RPL (log1pf, float, (float x)); | |
1489 | _GL_CXXALIAS_RPL (log1pf, float, (float x)); | |
1490 | # else | |
1491 | # if !@HAVE_LOG1PF@ | |
1492 | _GL_FUNCDECL_SYS (log1pf, float, (float x)); | |
1493 | # endif | |
1494 | _GL_CXXALIAS_SYS (log1pf, float, (float x)); | |
1495 | # endif | |
1496 | _GL_CXXALIASWARN (log1pf); | |
1497 | #elif defined GNULIB_POSIXCHECK | |
1498 | # undef log1pf | |
1499 | # if HAVE_RAW_DECL_LOG1PF | |
1500 | _GL_WARN_ON_USE (log1pf, "log1pf is unportable - " | |
1501 | "use gnulib module log1pf for portability"); | |
1502 | # endif | |
1503 | #endif | |
1504 | ||
1505 | #if @GNULIB_LOG1P@ | |
1506 | # if @REPLACE_LOG1P@ | |
1507 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1508 | # undef log1p | |
1509 | # define log1p rpl_log1p | |
1510 | # endif | |
1511 | _GL_FUNCDECL_RPL (log1p, double, (double x)); | |
1512 | _GL_CXXALIAS_RPL (log1p, double, (double x)); | |
1513 | # else | |
1514 | # if !@HAVE_LOG1P@ | |
1515 | _GL_FUNCDECL_SYS (log1p, double, (double x)); | |
1516 | # endif | |
1517 | _GL_CXXALIAS_SYS (log1p, double, (double x)); | |
1518 | # endif | |
c0c3707f | 1519 | # if __GLIBC__ >= 2 |
88b48903 | 1520 | _GL_CXXALIASWARN (log1p); |
c0c3707f | 1521 | # endif |
88b48903 WN |
1522 | #elif defined GNULIB_POSIXCHECK |
1523 | # undef log1p | |
1524 | # if HAVE_RAW_DECL_LOG1P | |
1525 | _GL_WARN_ON_USE (log1p, "log1p has portability problems - " | |
1526 | "use gnulib module log1p for portability"); | |
1527 | # endif | |
1528 | #endif | |
1529 | ||
1530 | #if @GNULIB_LOG1PL@ | |
1531 | # if @REPLACE_LOG1PL@ | |
1532 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1533 | # undef log1pl | |
1534 | # define log1pl rpl_log1pl | |
1535 | # endif | |
1536 | _GL_FUNCDECL_RPL (log1pl, long double, (long double x)); | |
1537 | _GL_CXXALIAS_RPL (log1pl, long double, (long double x)); | |
1538 | # else | |
1539 | # if !@HAVE_LOG1PL@ | |
1540 | _GL_FUNCDECL_SYS (log1pl, long double, (long double x)); | |
1541 | # endif | |
1542 | _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); | |
1543 | # endif | |
1544 | _GL_CXXALIASWARN (log1pl); | |
1545 | #elif defined GNULIB_POSIXCHECK | |
1546 | # undef log1pl | |
1547 | # if HAVE_RAW_DECL_LOG1PL | |
1548 | _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " | |
1549 | "use gnulib module log1pl for portability"); | |
1550 | # endif | |
1551 | #endif | |
1552 | ||
1553 | ||
1554 | #if @GNULIB_LOG2F@ | |
1555 | # if @REPLACE_LOG2F@ | |
1556 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1557 | # undef log2f | |
1558 | # define log2f rpl_log2f | |
1559 | # endif | |
1560 | _GL_FUNCDECL_RPL (log2f, float, (float x)); | |
1561 | _GL_CXXALIAS_RPL (log2f, float, (float x)); | |
1562 | # else | |
1563 | # if !@HAVE_DECL_LOG2F@ | |
1564 | # undef log2f | |
1565 | _GL_FUNCDECL_SYS (log2f, float, (float x)); | |
1566 | # endif | |
1567 | _GL_CXXALIAS_SYS (log2f, float, (float x)); | |
1568 | # endif | |
1569 | _GL_CXXALIASWARN (log2f); | |
1570 | #elif defined GNULIB_POSIXCHECK | |
1571 | # undef log2f | |
1572 | # if HAVE_RAW_DECL_LOG2F | |
1573 | _GL_WARN_ON_USE (log2f, "log2f is unportable - " | |
1574 | "use gnulib module log2f for portability"); | |
1575 | # endif | |
1576 | #endif | |
1577 | ||
1578 | #if @GNULIB_LOG2@ | |
1579 | # if @REPLACE_LOG2@ | |
1580 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1581 | # undef log2 | |
1582 | # define log2 rpl_log2 | |
1583 | # endif | |
1584 | _GL_FUNCDECL_RPL (log2, double, (double x)); | |
1585 | _GL_CXXALIAS_RPL (log2, double, (double x)); | |
1586 | # else | |
1587 | # if !@HAVE_DECL_LOG2@ | |
1588 | # undef log2 | |
1589 | _GL_FUNCDECL_SYS (log2, double, (double x)); | |
1590 | # endif | |
1591 | _GL_CXXALIAS_SYS (log2, double, (double x)); | |
1592 | # endif | |
c0c3707f | 1593 | # if __GLIBC__ >= 2 |
88b48903 | 1594 | _GL_CXXALIASWARN (log2); |
c0c3707f | 1595 | # endif |
88b48903 WN |
1596 | #elif defined GNULIB_POSIXCHECK |
1597 | # undef log2 | |
1598 | # if HAVE_RAW_DECL_LOG2 | |
1599 | _GL_WARN_ON_USE (log2, "log2 is unportable - " | |
1600 | "use gnulib module log2 for portability"); | |
1601 | # endif | |
1602 | #endif | |
1603 | ||
1604 | #if @GNULIB_LOG2L@ | |
1605 | # if @REPLACE_LOG2L@ | |
1606 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1607 | # undef log2l | |
1608 | # define log2l rpl_log2l | |
1609 | # endif | |
1610 | _GL_FUNCDECL_RPL (log2l, long double, (long double x)); | |
1611 | _GL_CXXALIAS_RPL (log2l, long double, (long double x)); | |
1612 | # else | |
1613 | # if !@HAVE_DECL_LOG2L@ | |
1614 | _GL_FUNCDECL_SYS (log2l, long double, (long double x)); | |
1615 | # endif | |
1616 | _GL_CXXALIAS_SYS (log2l, long double, (long double x)); | |
1617 | # endif | |
1618 | _GL_CXXALIASWARN (log2l); | |
1619 | #elif defined GNULIB_POSIXCHECK | |
1620 | # undef log2l | |
1621 | # if HAVE_RAW_DECL_LOG2L | |
1622 | _GL_WARN_ON_USE (log2l, "log2l is unportable - " | |
1623 | "use gnulib module log2l for portability"); | |
1624 | # endif | |
1625 | #endif | |
1626 | ||
1627 | ||
1628 | #if @GNULIB_LOGBF@ | |
1629 | # if @REPLACE_LOGBF@ | |
1630 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1631 | # undef logbf | |
1632 | # define logbf rpl_logbf | |
1633 | # endif | |
1634 | _GL_FUNCDECL_RPL (logbf, float, (float x)); | |
1635 | _GL_CXXALIAS_RPL (logbf, float, (float x)); | |
1636 | # else | |
1637 | # if !@HAVE_LOGBF@ | |
1638 | _GL_FUNCDECL_SYS (logbf, float, (float x)); | |
1639 | # endif | |
1640 | _GL_CXXALIAS_SYS (logbf, float, (float x)); | |
1641 | # endif | |
1642 | _GL_CXXALIASWARN (logbf); | |
1643 | #elif defined GNULIB_POSIXCHECK | |
1644 | # undef logbf | |
1645 | # if HAVE_RAW_DECL_LOGBF | |
1646 | _GL_WARN_ON_USE (logbf, "logbf is unportable - " | |
1647 | "use gnulib module logbf for portability"); | |
1648 | # endif | |
1649 | #endif | |
1650 | ||
1651 | #if @GNULIB_LOGB@ | |
1652 | # if @REPLACE_LOGB@ | |
1653 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1654 | # undef logb | |
1655 | # define logb rpl_logb | |
1656 | # endif | |
1657 | _GL_FUNCDECL_RPL (logb, double, (double x)); | |
1658 | _GL_CXXALIAS_RPL (logb, double, (double x)); | |
1659 | # else | |
1660 | # if !@HAVE_DECL_LOGB@ | |
1661 | _GL_FUNCDECL_SYS (logb, double, (double x)); | |
1662 | # endif | |
1663 | _GL_CXXALIAS_SYS (logb, double, (double x)); | |
1664 | # endif | |
c0c3707f | 1665 | # if __GLIBC__ >= 2 |
88b48903 | 1666 | _GL_CXXALIASWARN (logb); |
c0c3707f | 1667 | # endif |
88b48903 WN |
1668 | #elif defined GNULIB_POSIXCHECK |
1669 | # undef logb | |
1670 | # if HAVE_RAW_DECL_LOGB | |
1671 | _GL_WARN_ON_USE (logb, "logb is unportable - " | |
1672 | "use gnulib module logb for portability"); | |
1673 | # endif | |
1674 | #endif | |
1675 | ||
1676 | #if @GNULIB_LOGBL@ | |
1677 | # if @REPLACE_LOGBL@ | |
1678 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1679 | # undef logbl | |
1680 | # define logbl rpl_logbl | |
1681 | # endif | |
1682 | _GL_FUNCDECL_RPL (logbl, long double, (long double x)); | |
1683 | _GL_CXXALIAS_RPL (logbl, long double, (long double x)); | |
1684 | # else | |
1685 | # if !@HAVE_LOGBL@ | |
1686 | _GL_FUNCDECL_SYS (logbl, long double, (long double x)); | |
1687 | # endif | |
1688 | _GL_CXXALIAS_SYS (logbl, long double, (long double x)); | |
1689 | # endif | |
1690 | _GL_CXXALIASWARN (logbl); | |
1691 | #elif defined GNULIB_POSIXCHECK | |
1692 | # undef logbl | |
1693 | # if HAVE_RAW_DECL_LOGBL | |
1694 | _GL_WARN_ON_USE (logbl, "logbl is unportable - " | |
1695 | "use gnulib module logbl for portability"); | |
1696 | # endif | |
1697 | #endif | |
1698 | ||
1699 | ||
1700 | #if @GNULIB_MODFF@ | |
1701 | # if @REPLACE_MODFF@ | |
1702 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1703 | # undef modff | |
1704 | # define modff rpl_modff | |
1705 | # endif | |
1706 | _GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); | |
1707 | _GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); | |
1708 | # else | |
1709 | # if !@HAVE_MODFF@ | |
1710 | # undef modff | |
1711 | _GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); | |
1712 | # endif | |
1713 | _GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); | |
1714 | # endif | |
1715 | _GL_CXXALIASWARN (modff); | |
1716 | #elif defined GNULIB_POSIXCHECK | |
1717 | # undef modff | |
1718 | # if HAVE_RAW_DECL_MODFF | |
1719 | _GL_WARN_ON_USE (modff, "modff is unportable - " | |
1720 | "use gnulib module modff for portability"); | |
1721 | # endif | |
1722 | #endif | |
1723 | ||
1724 | #if @GNULIB_MODF@ | |
1725 | # if @REPLACE_MODF@ | |
1726 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1727 | # undef modf | |
1728 | # define modf rpl_modf | |
1729 | # endif | |
1730 | _GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); | |
1731 | _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); | |
1732 | # else | |
1733 | _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); | |
1734 | # endif | |
c0c3707f | 1735 | # if __GLIBC__ >= 2 |
88b48903 | 1736 | _GL_CXXALIASWARN (modf); |
c0c3707f | 1737 | # endif |
88b48903 WN |
1738 | #elif defined GNULIB_POSIXCHECK |
1739 | # undef modf | |
1740 | # if HAVE_RAW_DECL_MODF | |
1741 | _GL_WARN_ON_USE (modf, "modf has portability problems - " | |
1742 | "use gnulib module modf for portability"); | |
1743 | # endif | |
1744 | #endif | |
1745 | ||
1746 | #if @GNULIB_MODFL@ | |
1747 | # if @REPLACE_MODFL@ | |
1748 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1749 | # undef modfl | |
1750 | # define modfl rpl_modfl | |
1751 | # endif | |
1752 | _GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) | |
1753 | _GL_ARG_NONNULL ((2))); | |
1754 | _GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); | |
1755 | # else | |
1756 | # if !@HAVE_MODFL@ | |
1757 | # undef modfl | |
1758 | _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) | |
1759 | _GL_ARG_NONNULL ((2))); | |
1760 | # endif | |
1761 | _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); | |
1762 | # endif | |
1763 | _GL_CXXALIASWARN (modfl); | |
1764 | #elif defined GNULIB_POSIXCHECK | |
1765 | # undef modfl | |
1766 | # if HAVE_RAW_DECL_MODFL | |
1767 | _GL_WARN_ON_USE (modfl, "modfl is unportable - " | |
1768 | "use gnulib module modfl for portability"); | |
1769 | # endif | |
1770 | #endif | |
1771 | ||
1772 | ||
1773 | #if @GNULIB_POWF@ | |
1774 | # if !@HAVE_POWF@ | |
1775 | # undef powf | |
1776 | _GL_FUNCDECL_SYS (powf, float, (float x, float y)); | |
1777 | # endif | |
1778 | _GL_CXXALIAS_SYS (powf, float, (float x, float y)); | |
1779 | _GL_CXXALIASWARN (powf); | |
1780 | #elif defined GNULIB_POSIXCHECK | |
1781 | # undef powf | |
1782 | # if HAVE_RAW_DECL_POWF | |
1783 | _GL_WARN_ON_USE (powf, "powf is unportable - " | |
1784 | "use gnulib module powf for portability"); | |
1785 | # endif | |
1786 | #endif | |
1787 | ||
1788 | ||
1789 | #if @GNULIB_REMAINDERF@ | |
1790 | # if @REPLACE_REMAINDERF@ | |
1791 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1792 | # undef remainderf | |
1793 | # define remainderf rpl_remainderf | |
1794 | # endif | |
1795 | _GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); | |
1796 | _GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); | |
1797 | # else | |
1798 | # if !@HAVE_REMAINDERF@ | |
1799 | _GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); | |
1800 | # endif | |
1801 | _GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); | |
1802 | # endif | |
1803 | _GL_CXXALIASWARN (remainderf); | |
1804 | #elif defined GNULIB_POSIXCHECK | |
1805 | # undef remainderf | |
1806 | # if HAVE_RAW_DECL_REMAINDERF | |
1807 | _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " | |
1808 | "use gnulib module remainderf for portability"); | |
1809 | # endif | |
1810 | #endif | |
1811 | ||
1812 | #if @GNULIB_REMAINDER@ | |
1813 | # if @REPLACE_REMAINDER@ | |
1814 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1815 | # undef remainder | |
1816 | # define remainder rpl_remainder | |
1817 | # endif | |
1818 | _GL_FUNCDECL_RPL (remainder, double, (double x, double y)); | |
1819 | _GL_CXXALIAS_RPL (remainder, double, (double x, double y)); | |
1820 | # else | |
1821 | # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@ | |
1822 | _GL_FUNCDECL_SYS (remainder, double, (double x, double y)); | |
1823 | # endif | |
1824 | _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); | |
1825 | # endif | |
c0c3707f | 1826 | # if __GLIBC__ >= 2 |
88b48903 | 1827 | _GL_CXXALIASWARN (remainder); |
c0c3707f | 1828 | # endif |
88b48903 WN |
1829 | #elif defined GNULIB_POSIXCHECK |
1830 | # undef remainder | |
1831 | # if HAVE_RAW_DECL_REMAINDER | |
1832 | _GL_WARN_ON_USE (remainder, "remainder is unportable - " | |
1833 | "use gnulib module remainder for portability"); | |
1834 | # endif | |
1835 | #endif | |
1836 | ||
1837 | #if @GNULIB_REMAINDERL@ | |
1838 | # if @REPLACE_REMAINDERL@ | |
1839 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1840 | # undef remainderl | |
1841 | # define remainderl rpl_remainderl | |
1842 | # endif | |
1843 | _GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); | |
1844 | _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); | |
1845 | # else | |
1846 | # if !@HAVE_DECL_REMAINDERL@ | |
1847 | # undef remainderl | |
c0c3707f | 1848 | # if !(defined __cplusplus && defined _AIX) |
88b48903 | 1849 | _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); |
c0c3707f | 1850 | # endif |
88b48903 WN |
1851 | # endif |
1852 | _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); | |
1853 | # endif | |
1854 | _GL_CXXALIASWARN (remainderl); | |
1855 | #elif defined GNULIB_POSIXCHECK | |
1856 | # undef remainderl | |
1857 | # if HAVE_RAW_DECL_REMAINDERL | |
1858 | _GL_WARN_ON_USE (remainderl, "remainderl is unportable - " | |
1859 | "use gnulib module remainderl for portability"); | |
1860 | # endif | |
1861 | #endif | |
1862 | ||
1863 | ||
1864 | #if @GNULIB_RINTF@ | |
1865 | # if !@HAVE_DECL_RINTF@ | |
1866 | _GL_FUNCDECL_SYS (rintf, float, (float x)); | |
1867 | # endif | |
1868 | _GL_CXXALIAS_SYS (rintf, float, (float x)); | |
1869 | _GL_CXXALIASWARN (rintf); | |
1870 | #elif defined GNULIB_POSIXCHECK | |
1871 | # undef rintf | |
1872 | # if HAVE_RAW_DECL_RINTF | |
1873 | _GL_WARN_ON_USE (rintf, "rintf is unportable - " | |
1874 | "use gnulib module rintf for portability"); | |
1875 | # endif | |
1876 | #endif | |
1877 | ||
1878 | #if @GNULIB_RINT@ | |
1879 | # if !@HAVE_RINT@ | |
1880 | _GL_FUNCDECL_SYS (rint, double, (double x)); | |
1881 | # endif | |
1882 | _GL_CXXALIAS_SYS (rint, double, (double x)); | |
c0c3707f | 1883 | # if __GLIBC__ >= 2 |
88b48903 | 1884 | _GL_CXXALIASWARN (rint); |
c0c3707f | 1885 | # endif |
88b48903 WN |
1886 | #elif defined GNULIB_POSIXCHECK |
1887 | # undef rint | |
1888 | # if HAVE_RAW_DECL_RINT | |
1889 | _GL_WARN_ON_USE (rint, "rint is unportable - " | |
1890 | "use gnulib module rint for portability"); | |
1891 | # endif | |
1892 | #endif | |
1893 | ||
1894 | #if @GNULIB_RINTL@ | |
c0c3707f CB |
1895 | # if @REPLACE_RINTL@ |
1896 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1897 | # undef rintl | |
1898 | # define rintl rpl_rintl | |
1899 | # endif | |
1900 | _GL_FUNCDECL_RPL (rintl, long double, (long double x)); | |
1901 | _GL_CXXALIAS_RPL (rintl, long double, (long double x)); | |
1902 | # else | |
1903 | # if !@HAVE_RINTL@ | |
88b48903 | 1904 | _GL_FUNCDECL_SYS (rintl, long double, (long double x)); |
c0c3707f | 1905 | # endif |
88b48903 | 1906 | _GL_CXXALIAS_SYS (rintl, long double, (long double x)); |
c0c3707f | 1907 | # endif |
88b48903 WN |
1908 | _GL_CXXALIASWARN (rintl); |
1909 | #elif defined GNULIB_POSIXCHECK | |
1910 | # undef rintl | |
1911 | # if HAVE_RAW_DECL_RINTL | |
1912 | _GL_WARN_ON_USE (rintl, "rintl is unportable - " | |
1913 | "use gnulib module rintl for portability"); | |
1914 | # endif | |
1915 | #endif | |
1916 | ||
1917 | ||
1918 | #if @GNULIB_ROUNDF@ | |
1919 | # if @REPLACE_ROUNDF@ | |
1920 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1921 | # undef roundf | |
1922 | # define roundf rpl_roundf | |
1923 | # endif | |
1924 | _GL_FUNCDECL_RPL (roundf, float, (float x)); | |
1925 | _GL_CXXALIAS_RPL (roundf, float, (float x)); | |
1926 | # else | |
1927 | # if !@HAVE_DECL_ROUNDF@ | |
1928 | _GL_FUNCDECL_SYS (roundf, float, (float x)); | |
1929 | # endif | |
1930 | _GL_CXXALIAS_SYS (roundf, float, (float x)); | |
1931 | # endif | |
1932 | _GL_CXXALIASWARN (roundf); | |
1933 | #elif defined GNULIB_POSIXCHECK | |
1934 | # undef roundf | |
1935 | # if HAVE_RAW_DECL_ROUNDF | |
1936 | _GL_WARN_ON_USE (roundf, "roundf is unportable - " | |
1937 | "use gnulib module roundf for portability"); | |
1938 | # endif | |
1939 | #endif | |
1940 | ||
1941 | #if @GNULIB_ROUND@ | |
1942 | # if @REPLACE_ROUND@ | |
1943 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1944 | # undef round | |
1945 | # define round rpl_round | |
1946 | # endif | |
1947 | _GL_FUNCDECL_RPL (round, double, (double x)); | |
1948 | _GL_CXXALIAS_RPL (round, double, (double x)); | |
1949 | # else | |
1950 | # if !@HAVE_DECL_ROUND@ | |
1951 | _GL_FUNCDECL_SYS (round, double, (double x)); | |
1952 | # endif | |
1953 | _GL_CXXALIAS_SYS (round, double, (double x)); | |
1954 | # endif | |
c0c3707f | 1955 | # if __GLIBC__ >= 2 |
88b48903 | 1956 | _GL_CXXALIASWARN (round); |
c0c3707f | 1957 | # endif |
88b48903 WN |
1958 | #elif defined GNULIB_POSIXCHECK |
1959 | # undef round | |
1960 | # if HAVE_RAW_DECL_ROUND | |
1961 | _GL_WARN_ON_USE (round, "round is unportable - " | |
1962 | "use gnulib module round for portability"); | |
1963 | # endif | |
1964 | #endif | |
1965 | ||
1966 | #if @GNULIB_ROUNDL@ | |
1967 | # if @REPLACE_ROUNDL@ | |
1968 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1969 | # undef roundl | |
1970 | # define roundl rpl_roundl | |
1971 | # endif | |
1972 | _GL_FUNCDECL_RPL (roundl, long double, (long double x)); | |
1973 | _GL_CXXALIAS_RPL (roundl, long double, (long double x)); | |
1974 | # else | |
1975 | # if !@HAVE_DECL_ROUNDL@ | |
1976 | # undef roundl | |
c0c3707f | 1977 | # if !(defined __cplusplus && defined _AIX) |
88b48903 | 1978 | _GL_FUNCDECL_SYS (roundl, long double, (long double x)); |
c0c3707f | 1979 | # endif |
88b48903 WN |
1980 | # endif |
1981 | _GL_CXXALIAS_SYS (roundl, long double, (long double x)); | |
1982 | # endif | |
1983 | _GL_CXXALIASWARN (roundl); | |
1984 | #elif defined GNULIB_POSIXCHECK | |
1985 | # undef roundl | |
1986 | # if HAVE_RAW_DECL_ROUNDL | |
1987 | _GL_WARN_ON_USE (roundl, "roundl is unportable - " | |
1988 | "use gnulib module roundl for portability"); | |
1989 | # endif | |
1990 | #endif | |
1991 | ||
1992 | ||
1993 | #if @GNULIB_SINF@ | |
c0c3707f CB |
1994 | # if @REPLACE_SINF@ |
1995 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1996 | # undef sinf | |
1997 | # define sinf rpl_sinf | |
1998 | # endif | |
1999 | _GL_FUNCDECL_RPL (sinf, float, (float x)); | |
2000 | _GL_CXXALIAS_RPL (sinf, float, (float x)); | |
2001 | # else | |
2002 | # if !@HAVE_SINF@ | |
2003 | # undef sinf | |
88b48903 | 2004 | _GL_FUNCDECL_SYS (sinf, float, (float x)); |
c0c3707f | 2005 | # endif |
5e8754f9 | 2006 | _GL_CXXALIAS_SYS (sinf, float, (float x)); |
c0c3707f | 2007 | # endif |
88b48903 WN |
2008 | _GL_CXXALIASWARN (sinf); |
2009 | #elif defined GNULIB_POSIXCHECK | |
2010 | # undef sinf | |
2011 | # if HAVE_RAW_DECL_SINF | |
2012 | _GL_WARN_ON_USE (sinf, "sinf is unportable - " | |
2013 | "use gnulib module sinf for portability"); | |
2014 | # endif | |
2015 | #endif | |
2016 | ||
2017 | #if @GNULIB_SINL@ | |
2018 | # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ | |
2019 | # undef sinl | |
2020 | _GL_FUNCDECL_SYS (sinl, long double, (long double x)); | |
2021 | # endif | |
2022 | _GL_CXXALIAS_SYS (sinl, long double, (long double x)); | |
2023 | _GL_CXXALIASWARN (sinl); | |
2024 | #elif defined GNULIB_POSIXCHECK | |
2025 | # undef sinl | |
2026 | # if HAVE_RAW_DECL_SINL | |
2027 | _GL_WARN_ON_USE (sinl, "sinl is unportable - " | |
2028 | "use gnulib module sinl for portability"); | |
2029 | # endif | |
2030 | #endif | |
2031 | ||
2032 | ||
2033 | #if @GNULIB_SINHF@ | |
c0c3707f CB |
2034 | # if @REPLACE_SINHF@ |
2035 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2036 | # undef sinhf | |
2037 | # define sinhf rpl_sinhf | |
2038 | # endif | |
2039 | _GL_FUNCDECL_RPL (sinhf, float, (float x)); | |
2040 | _GL_CXXALIAS_RPL (sinhf, float, (float x)); | |
2041 | # else | |
2042 | # if !@HAVE_SINHF@ | |
2043 | # undef sinhf | |
88b48903 | 2044 | _GL_FUNCDECL_SYS (sinhf, float, (float x)); |
c0c3707f | 2045 | # endif |
5e8754f9 | 2046 | _GL_CXXALIAS_SYS (sinhf, float, (float x)); |
c0c3707f | 2047 | # endif |
88b48903 WN |
2048 | _GL_CXXALIASWARN (sinhf); |
2049 | #elif defined GNULIB_POSIXCHECK | |
2050 | # undef sinhf | |
2051 | # if HAVE_RAW_DECL_SINHF | |
2052 | _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " | |
2053 | "use gnulib module sinhf for portability"); | |
2054 | # endif | |
2055 | #endif | |
2056 | ||
2057 | ||
2058 | #if @GNULIB_SQRTF@ | |
c0c3707f CB |
2059 | # if @REPLACE_SQRTF@ |
2060 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2061 | # undef sqrtf | |
2062 | # define sqrtf rpl_sqrtf | |
2063 | # endif | |
2064 | _GL_FUNCDECL_RPL (sqrtf, float, (float x)); | |
2065 | _GL_CXXALIAS_RPL (sqrtf, float, (float x)); | |
2066 | # else | |
2067 | # if !@HAVE_SQRTF@ | |
2068 | # undef sqrtf | |
88b48903 | 2069 | _GL_FUNCDECL_SYS (sqrtf, float, (float x)); |
c0c3707f | 2070 | # endif |
5e8754f9 | 2071 | _GL_CXXALIAS_SYS (sqrtf, float, (float x)); |
c0c3707f | 2072 | # endif |
88b48903 WN |
2073 | _GL_CXXALIASWARN (sqrtf); |
2074 | #elif defined GNULIB_POSIXCHECK | |
2075 | # undef sqrtf | |
2076 | # if HAVE_RAW_DECL_SQRTF | |
2077 | _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " | |
2078 | "use gnulib module sqrtf for portability"); | |
2079 | # endif | |
2080 | #endif | |
2081 | ||
2082 | #if @GNULIB_SQRTL@ | |
2083 | # if @REPLACE_SQRTL@ | |
2084 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2085 | # undef sqrtl | |
2086 | # define sqrtl rpl_sqrtl | |
2087 | # endif | |
2088 | _GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); | |
2089 | _GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); | |
2090 | # else | |
2091 | # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ | |
2092 | # undef sqrtl | |
2093 | _GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); | |
2094 | # endif | |
2095 | _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); | |
2096 | # endif | |
2097 | _GL_CXXALIASWARN (sqrtl); | |
2098 | #elif defined GNULIB_POSIXCHECK | |
2099 | # undef sqrtl | |
2100 | # if HAVE_RAW_DECL_SQRTL | |
2101 | _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " | |
2102 | "use gnulib module sqrtl for portability"); | |
2103 | # endif | |
2104 | #endif | |
2105 | ||
2106 | ||
2107 | #if @GNULIB_TANF@ | |
c0c3707f CB |
2108 | # if @REPLACE_TANF@ |
2109 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2110 | # undef tanf | |
2111 | # define tanf rpl_tanf | |
2112 | # endif | |
2113 | _GL_FUNCDECL_RPL (tanf, float, (float x)); | |
2114 | _GL_CXXALIAS_RPL (tanf, float, (float x)); | |
2115 | # else | |
2116 | # if !@HAVE_TANF@ | |
2117 | # undef tanf | |
88b48903 | 2118 | _GL_FUNCDECL_SYS (tanf, float, (float x)); |
c0c3707f | 2119 | # endif |
5e8754f9 | 2120 | _GL_CXXALIAS_SYS (tanf, float, (float x)); |
c0c3707f | 2121 | # endif |
88b48903 WN |
2122 | _GL_CXXALIASWARN (tanf); |
2123 | #elif defined GNULIB_POSIXCHECK | |
2124 | # undef tanf | |
2125 | # if HAVE_RAW_DECL_TANF | |
2126 | _GL_WARN_ON_USE (tanf, "tanf is unportable - " | |
2127 | "use gnulib module tanf for portability"); | |
2128 | # endif | |
2129 | #endif | |
2130 | ||
2131 | #if @GNULIB_TANL@ | |
2132 | # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ | |
2133 | # undef tanl | |
2134 | _GL_FUNCDECL_SYS (tanl, long double, (long double x)); | |
2135 | # endif | |
2136 | _GL_CXXALIAS_SYS (tanl, long double, (long double x)); | |
2137 | _GL_CXXALIASWARN (tanl); | |
2138 | #elif defined GNULIB_POSIXCHECK | |
2139 | # undef tanl | |
2140 | # if HAVE_RAW_DECL_TANL | |
2141 | _GL_WARN_ON_USE (tanl, "tanl is unportable - " | |
2142 | "use gnulib module tanl for portability"); | |
2143 | # endif | |
2144 | #endif | |
2145 | ||
2146 | ||
2147 | #if @GNULIB_TANHF@ | |
c0c3707f CB |
2148 | # if @REPLACE_TANHF@ |
2149 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2150 | # undef tanhf | |
2151 | # define tanhf rpl_tanhf | |
2152 | # endif | |
2153 | _GL_FUNCDECL_RPL (tanhf, float, (float x)); | |
2154 | _GL_CXXALIAS_RPL (tanhf, float, (float x)); | |
2155 | # else | |
2156 | # if !@HAVE_TANHF@ | |
2157 | # undef tanhf | |
88b48903 | 2158 | _GL_FUNCDECL_SYS (tanhf, float, (float x)); |
c0c3707f | 2159 | # endif |
5e8754f9 | 2160 | _GL_CXXALIAS_SYS (tanhf, float, (float x)); |
c0c3707f | 2161 | # endif |
88b48903 WN |
2162 | _GL_CXXALIASWARN (tanhf); |
2163 | #elif defined GNULIB_POSIXCHECK | |
2164 | # undef tanhf | |
2165 | # if HAVE_RAW_DECL_TANHF | |
2166 | _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " | |
2167 | "use gnulib module tanhf for portability"); | |
2168 | # endif | |
2169 | #endif | |
2170 | ||
2171 | ||
2172 | #if @GNULIB_TRUNCF@ | |
2173 | # if @REPLACE_TRUNCF@ | |
2174 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 2175 | # undef truncf |
88b48903 WN |
2176 | # define truncf rpl_truncf |
2177 | # endif | |
2178 | _GL_FUNCDECL_RPL (truncf, float, (float x)); | |
2179 | _GL_CXXALIAS_RPL (truncf, float, (float x)); | |
2180 | # else | |
2181 | # if !@HAVE_DECL_TRUNCF@ | |
2182 | _GL_FUNCDECL_SYS (truncf, float, (float x)); | |
2183 | # endif | |
2184 | _GL_CXXALIAS_SYS (truncf, float, (float x)); | |
2185 | # endif | |
2186 | _GL_CXXALIASWARN (truncf); | |
2187 | #elif defined GNULIB_POSIXCHECK | |
2188 | # undef truncf | |
2189 | # if HAVE_RAW_DECL_TRUNCF | |
2190 | _GL_WARN_ON_USE (truncf, "truncf is unportable - " | |
2191 | "use gnulib module truncf for portability"); | |
2192 | # endif | |
2193 | #endif | |
2194 | ||
2195 | #if @GNULIB_TRUNC@ | |
2196 | # if @REPLACE_TRUNC@ | |
2197 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 2198 | # undef trunc |
88b48903 WN |
2199 | # define trunc rpl_trunc |
2200 | # endif | |
2201 | _GL_FUNCDECL_RPL (trunc, double, (double x)); | |
2202 | _GL_CXXALIAS_RPL (trunc, double, (double x)); | |
2203 | # else | |
2204 | # if !@HAVE_DECL_TRUNC@ | |
2205 | _GL_FUNCDECL_SYS (trunc, double, (double x)); | |
2206 | # endif | |
2207 | _GL_CXXALIAS_SYS (trunc, double, (double x)); | |
2208 | # endif | |
c0c3707f | 2209 | # if __GLIBC__ >= 2 |
88b48903 | 2210 | _GL_CXXALIASWARN (trunc); |
c0c3707f | 2211 | # endif |
88b48903 WN |
2212 | #elif defined GNULIB_POSIXCHECK |
2213 | # undef trunc | |
2214 | # if HAVE_RAW_DECL_TRUNC | |
2215 | _GL_WARN_ON_USE (trunc, "trunc is unportable - " | |
2216 | "use gnulib module trunc for portability"); | |
2217 | # endif | |
2218 | #endif | |
2219 | ||
2220 | #if @GNULIB_TRUNCL@ | |
2221 | # if @REPLACE_TRUNCL@ | |
2222 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2223 | # undef truncl | |
2224 | # define truncl rpl_truncl | |
2225 | # endif | |
2226 | _GL_FUNCDECL_RPL (truncl, long double, (long double x)); | |
2227 | _GL_CXXALIAS_RPL (truncl, long double, (long double x)); | |
2228 | # else | |
2229 | # if !@HAVE_DECL_TRUNCL@ | |
2230 | _GL_FUNCDECL_SYS (truncl, long double, (long double x)); | |
2231 | # endif | |
2232 | _GL_CXXALIAS_SYS (truncl, long double, (long double x)); | |
2233 | # endif | |
2234 | _GL_CXXALIASWARN (truncl); | |
2235 | #elif defined GNULIB_POSIXCHECK | |
2236 | # undef truncl | |
2237 | # if HAVE_RAW_DECL_TRUNCL | |
2238 | _GL_WARN_ON_USE (truncl, "truncl is unportable - " | |
2239 | "use gnulib module truncl for portability"); | |
2240 | # endif | |
2241 | #endif | |
2242 | ||
2243 | ||
2244 | /* Definitions of function-like macros come here, after the function | |
2245 | declarations. */ | |
2246 | ||
2247 | ||
2248 | #if @GNULIB_ISFINITE@ | |
2249 | # if @REPLACE_ISFINITE@ | |
2250 | _GL_EXTERN_C int gl_isfinitef (float x); | |
2251 | _GL_EXTERN_C int gl_isfinited (double x); | |
2252 | _GL_EXTERN_C int gl_isfinitel (long double x); | |
2253 | # undef isfinite | |
2254 | # define isfinite(x) \ | |
2255 | (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ | |
2256 | sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ | |
2257 | gl_isfinitef (x)) | |
2258 | # endif | |
2259 | # ifdef __cplusplus | |
4c62b19f | 2260 | # if defined isfinite || defined GNULIB_NAMESPACE |
88b48903 WN |
2261 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) |
2262 | # undef isfinite | |
c0c3707f CB |
2263 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) |
2264 | /* This platform's <cmath> possibly defines isfinite through a set of inline | |
2265 | functions. */ | |
2266 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) | |
2267 | # define isfinite rpl_isfinite | |
2268 | # else | |
2269 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) | |
2270 | # endif | |
88b48903 WN |
2271 | # endif |
2272 | # endif | |
2273 | #elif defined GNULIB_POSIXCHECK | |
2274 | # if defined isfinite | |
2275 | _GL_WARN_REAL_FLOATING_DECL (isfinite); | |
2276 | # undef isfinite | |
2277 | # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) | |
2278 | # endif | |
2279 | #endif | |
2280 | ||
2281 | ||
2282 | #if @GNULIB_ISINF@ | |
2283 | # if @REPLACE_ISINF@ | |
2284 | _GL_EXTERN_C int gl_isinff (float x); | |
2285 | _GL_EXTERN_C int gl_isinfd (double x); | |
2286 | _GL_EXTERN_C int gl_isinfl (long double x); | |
2287 | # undef isinf | |
2288 | # define isinf(x) \ | |
2289 | (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ | |
2290 | sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ | |
2291 | gl_isinff (x)) | |
2292 | # endif | |
2293 | # ifdef __cplusplus | |
4c62b19f | 2294 | # if defined isinf || defined GNULIB_NAMESPACE |
88b48903 WN |
2295 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) |
2296 | # undef isinf | |
c0c3707f CB |
2297 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) |
2298 | /* This platform's <cmath> possibly defines isinf through a set of inline | |
2299 | functions. */ | |
2300 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) | |
2301 | # define isinf rpl_isinf | |
2302 | # else | |
2303 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) | |
2304 | # endif | |
88b48903 WN |
2305 | # endif |
2306 | # endif | |
2307 | #elif defined GNULIB_POSIXCHECK | |
2308 | # if defined isinf | |
2309 | _GL_WARN_REAL_FLOATING_DECL (isinf); | |
2310 | # undef isinf | |
2311 | # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) | |
2312 | # endif | |
2313 | #endif | |
2314 | ||
2315 | ||
2316 | #if @GNULIB_ISNANF@ | |
2317 | /* Test for NaN for 'float' numbers. */ | |
2318 | # if @HAVE_ISNANF@ | |
2319 | /* The original <math.h> included above provides a declaration of isnan macro | |
2320 | or (older) isnanf function. */ | |
2321 | # if __GNUC__ >= 4 | |
2322 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | |
2323 | # undef isnanf | |
2324 | # define isnanf(x) __builtin_isnanf ((float)(x)) | |
2325 | # elif defined isnan | |
2326 | # undef isnanf | |
2327 | # define isnanf(x) isnan ((float)(x)) | |
2328 | # endif | |
2329 | # else | |
2330 | /* Test whether X is a NaN. */ | |
2331 | # undef isnanf | |
2332 | # define isnanf rpl_isnanf | |
2333 | _GL_EXTERN_C int isnanf (float x); | |
2334 | # endif | |
2335 | #endif | |
2336 | ||
2337 | #if @GNULIB_ISNAND@ | |
2338 | /* Test for NaN for 'double' numbers. | |
2339 | This function is a gnulib extension, unlike isnan() which applied only | |
2340 | to 'double' numbers earlier but now is a type-generic macro. */ | |
2341 | # if @HAVE_ISNAND@ | |
2342 | /* The original <math.h> included above provides a declaration of isnan | |
2343 | macro. */ | |
2344 | # if __GNUC__ >= 4 | |
2345 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | |
2346 | # undef isnand | |
2347 | # define isnand(x) __builtin_isnan ((double)(x)) | |
2348 | # else | |
2349 | # undef isnand | |
2350 | # define isnand(x) isnan ((double)(x)) | |
2351 | # endif | |
2352 | # else | |
2353 | /* Test whether X is a NaN. */ | |
2354 | # undef isnand | |
2355 | # define isnand rpl_isnand | |
2356 | _GL_EXTERN_C int isnand (double x); | |
2357 | # endif | |
2358 | #endif | |
2359 | ||
2360 | #if @GNULIB_ISNANL@ | |
2361 | /* Test for NaN for 'long double' numbers. */ | |
2362 | # if @HAVE_ISNANL@ | |
2363 | /* The original <math.h> included above provides a declaration of isnan | |
2364 | macro or (older) isnanl function. */ | |
2365 | # if __GNUC__ >= 4 | |
2366 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | |
2367 | # undef isnanl | |
2368 | # define isnanl(x) __builtin_isnanl ((long double)(x)) | |
2369 | # elif defined isnan | |
2370 | # undef isnanl | |
2371 | # define isnanl(x) isnan ((long double)(x)) | |
2372 | # endif | |
2373 | # else | |
2374 | /* Test whether X is a NaN. */ | |
2375 | # undef isnanl | |
2376 | # define isnanl rpl_isnanl | |
2377 | _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; | |
2378 | # endif | |
2379 | #endif | |
2380 | ||
2381 | /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ | |
2382 | #if @GNULIB_ISNAN@ | |
2383 | # if @REPLACE_ISNAN@ | |
2384 | /* We can't just use the isnanf macro (e.g.) as exposed by | |
2385 | isnanf.h (e.g.) here, because those may end up being macros | |
2386 | that recursively expand back to isnan. So use the gnulib | |
2387 | replacements for them directly. */ | |
2388 | # if @HAVE_ISNANF@ && __GNUC__ >= 4 | |
2389 | # define gl_isnan_f(x) __builtin_isnanf ((float)(x)) | |
2390 | # else | |
2391 | _GL_EXTERN_C int rpl_isnanf (float x); | |
2392 | # define gl_isnan_f(x) rpl_isnanf (x) | |
2393 | # endif | |
2394 | # if @HAVE_ISNAND@ && __GNUC__ >= 4 | |
2395 | # define gl_isnan_d(x) __builtin_isnan ((double)(x)) | |
2396 | # else | |
2397 | _GL_EXTERN_C int rpl_isnand (double x); | |
2398 | # define gl_isnan_d(x) rpl_isnand (x) | |
2399 | # endif | |
2400 | # if @HAVE_ISNANL@ && __GNUC__ >= 4 | |
2401 | # define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) | |
2402 | # else | |
2403 | _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; | |
2404 | # define gl_isnan_l(x) rpl_isnanl (x) | |
2405 | # endif | |
2406 | # undef isnan | |
2407 | # define isnan(x) \ | |
2408 | (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ | |
2409 | sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ | |
2410 | gl_isnan_f (x)) | |
2411 | # elif __GNUC__ >= 4 | |
2412 | # undef isnan | |
2413 | # define isnan(x) \ | |
2414 | (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ | |
2415 | sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ | |
2416 | __builtin_isnanf ((float)(x))) | |
2417 | # endif | |
2418 | # ifdef __cplusplus | |
4c62b19f | 2419 | # if defined isnan || defined GNULIB_NAMESPACE |
88b48903 WN |
2420 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) |
2421 | # undef isnan | |
c0c3707f CB |
2422 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) |
2423 | /* This platform's <cmath> possibly defines isnan through a set of inline | |
2424 | functions. */ | |
2425 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) | |
2426 | # define isnan rpl_isnan | |
2427 | # else | |
2428 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) | |
2429 | # endif | |
88b48903 WN |
2430 | # endif |
2431 | # else | |
2432 | /* Ensure isnan is a macro. */ | |
2433 | # ifndef isnan | |
2434 | # define isnan isnan | |
2435 | # endif | |
2436 | # endif | |
2437 | #elif defined GNULIB_POSIXCHECK | |
2438 | # if defined isnan | |
2439 | _GL_WARN_REAL_FLOATING_DECL (isnan); | |
2440 | # undef isnan | |
2441 | # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) | |
2442 | # endif | |
2443 | #endif | |
2444 | ||
2445 | ||
2446 | #if @GNULIB_SIGNBIT@ | |
49e4877c PA |
2447 | # if (@REPLACE_SIGNBIT_USING_GCC@ \ |
2448 | && (!defined __cplusplus || __cplusplus < 201103)) | |
88b48903 WN |
2449 | # undef signbit |
2450 | /* GCC 4.0 and newer provides three built-ins for signbit. */ | |
2451 | # define signbit(x) \ | |
2452 | (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ | |
2453 | sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ | |
2454 | __builtin_signbitf (x)) | |
2455 | # endif | |
c0c3707f | 2456 | # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit |
88b48903 WN |
2457 | # undef signbit |
2458 | _GL_EXTERN_C int gl_signbitf (float arg); | |
2459 | _GL_EXTERN_C int gl_signbitd (double arg); | |
2460 | _GL_EXTERN_C int gl_signbitl (long double arg); | |
2461 | # if __GNUC__ >= 2 && !defined __STRICT_ANSI__ | |
2462 | # define _GL_NUM_UINT_WORDS(type) \ | |
2463 | ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
2464 | # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf | |
2465 | # define gl_signbitf_OPTIMIZED_MACRO | |
2466 | # define gl_signbitf(arg) \ | |
2467 | ({ union { float _value; \ | |
2468 | unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ | |
2469 | } _m; \ | |
2470 | _m._value = (arg); \ | |
2471 | (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ | |
2472 | }) | |
2473 | # endif | |
2474 | # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd | |
2475 | # define gl_signbitd_OPTIMIZED_MACRO | |
2476 | # define gl_signbitd(arg) \ | |
2477 | ({ union { double _value; \ | |
2478 | unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ | |
2479 | } _m; \ | |
2480 | _m._value = (arg); \ | |
2481 | (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ | |
2482 | }) | |
2483 | # endif | |
2484 | # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl | |
2485 | # define gl_signbitl_OPTIMIZED_MACRO | |
2486 | # define gl_signbitl(arg) \ | |
2487 | ({ union { long double _value; \ | |
2488 | unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ | |
2489 | } _m; \ | |
2490 | _m._value = (arg); \ | |
2491 | (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ | |
2492 | }) | |
2493 | # endif | |
2494 | # endif | |
2495 | # define signbit(x) \ | |
2496 | (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ | |
2497 | sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ | |
2498 | gl_signbitf (x)) | |
c0c3707f | 2499 | # define GNULIB_defined_signbit 1 |
88b48903 WN |
2500 | # endif |
2501 | # ifdef __cplusplus | |
4c62b19f | 2502 | # if defined signbit || defined GNULIB_NAMESPACE |
88b48903 WN |
2503 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) |
2504 | # undef signbit | |
c0c3707f CB |
2505 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) |
2506 | /* This platform's <cmath> possibly defines signbit through a set of inline | |
2507 | functions. */ | |
2508 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) | |
2509 | # define signbit rpl_signbit | |
2510 | # else | |
2511 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) | |
2512 | # endif | |
88b48903 WN |
2513 | # endif |
2514 | # endif | |
2515 | #elif defined GNULIB_POSIXCHECK | |
2516 | # if defined signbit | |
2517 | _GL_WARN_REAL_FLOATING_DECL (signbit); | |
2518 | # undef signbit | |
2519 | # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) | |
2520 | # endif | |
2521 | #endif | |
2522 | ||
2523 | _GL_INLINE_HEADER_END | |
2524 | ||
2525 | #endif /* _@GUARD_PREFIX@_MATH_H */ | |
2526 | #endif /* _@GUARD_PREFIX@_MATH_H */ |