Commit | Line | Data |
---|---|---|
88b48903 WN |
1 | /* A GNU-like <math.h>. |
2 | ||
7a6dbc2f | 3 | Copyright (C) 2002-2003, 2007-2018 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 | |
7a6dbc2f | 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 | ||
7a6dbc2f SDJ |
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 | } | |
70 | # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \ | |
4c62b19f | 71 | _GL_BEGIN_NAMESPACE \ |
88b48903 WN |
72 | inline int \ |
73 | func (float f) \ | |
74 | { \ | |
75 | return _gl_cxx_ ## func ## f (f); \ | |
76 | } \ | |
77 | inline int \ | |
78 | func (double d) \ | |
79 | { \ | |
80 | return _gl_cxx_ ## func ## d (d); \ | |
81 | } \ | |
82 | inline int \ | |
83 | func (long double l) \ | |
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) \ | |
7a6dbc2f SDJ |
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 | ||
7a6dbc2f SDJ |
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@ | |
7a6dbc2f SDJ |
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)); |
7a6dbc2f | 240 | # endif |
88b48903 | 241 | _GL_CXXALIAS_SYS (acosf, float, (float x)); |
7a6dbc2f | 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@ | |
7a6dbc2f SDJ |
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)); |
7a6dbc2f | 280 | # endif |
88b48903 | 281 | _GL_CXXALIAS_SYS (asinf, float, (float x)); |
7a6dbc2f | 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@ | |
7a6dbc2f SDJ |
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)); |
7a6dbc2f | 320 | # endif |
88b48903 | 321 | _GL_CXXALIAS_SYS (atanf, float, (float x)); |
7a6dbc2f | 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@ | |
7a6dbc2f SDJ |
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)); |
7a6dbc2f | 360 | # endif |
88b48903 | 361 | _GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); |
7a6dbc2f | 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)); | |
401 | _GL_CXXALIASWARN (cbrt); | |
402 | #elif defined GNULIB_POSIXCHECK | |
403 | # undef cbrt | |
404 | # if HAVE_RAW_DECL_CBRT | |
405 | _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " | |
406 | "use gnulib module cbrt for portability"); | |
407 | # endif | |
408 | #endif | |
409 | ||
410 | #if @GNULIB_CBRTL@ | |
411 | # if @REPLACE_CBRTL@ | |
412 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
413 | # undef cbrtl | |
414 | # define cbrtl rpl_cbrtl | |
415 | # endif | |
416 | _GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); | |
417 | _GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); | |
418 | # else | |
419 | # if !@HAVE_DECL_CBRTL@ | |
420 | _GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); | |
421 | # endif | |
422 | _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); | |
423 | # endif | |
424 | _GL_CXXALIASWARN (cbrtl); | |
425 | #elif defined GNULIB_POSIXCHECK | |
426 | # undef cbrtl | |
427 | # if HAVE_RAW_DECL_CBRTL | |
428 | _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " | |
429 | "use gnulib module cbrtl for portability"); | |
430 | # endif | |
431 | #endif | |
432 | ||
433 | ||
434 | #if @GNULIB_CEILF@ | |
435 | # if @REPLACE_CEILF@ | |
436 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
437 | # undef ceilf | |
438 | # define ceilf rpl_ceilf | |
439 | # endif | |
440 | _GL_FUNCDECL_RPL (ceilf, float, (float x)); | |
441 | _GL_CXXALIAS_RPL (ceilf, float, (float x)); | |
442 | # else | |
443 | # if !@HAVE_DECL_CEILF@ | |
444 | # undef ceilf | |
445 | _GL_FUNCDECL_SYS (ceilf, float, (float x)); | |
446 | # endif | |
447 | _GL_CXXALIAS_SYS (ceilf, float, (float x)); | |
448 | # endif | |
449 | _GL_CXXALIASWARN (ceilf); | |
450 | #elif defined GNULIB_POSIXCHECK | |
451 | # undef ceilf | |
452 | # if HAVE_RAW_DECL_CEILF | |
453 | _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " | |
454 | "use gnulib module ceilf for portability"); | |
455 | # endif | |
456 | #endif | |
457 | ||
458 | #if @GNULIB_CEIL@ | |
459 | # if @REPLACE_CEIL@ | |
460 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 461 | # undef ceil |
88b48903 WN |
462 | # define ceil rpl_ceil |
463 | # endif | |
464 | _GL_FUNCDECL_RPL (ceil, double, (double x)); | |
465 | _GL_CXXALIAS_RPL (ceil, double, (double x)); | |
466 | # else | |
467 | _GL_CXXALIAS_SYS (ceil, double, (double x)); | |
468 | # endif | |
469 | _GL_CXXALIASWARN (ceil); | |
470 | #endif | |
471 | ||
472 | #if @GNULIB_CEILL@ | |
473 | # if @REPLACE_CEILL@ | |
474 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
475 | # undef ceill | |
476 | # define ceill rpl_ceill | |
477 | # endif | |
478 | _GL_FUNCDECL_RPL (ceill, long double, (long double x)); | |
479 | _GL_CXXALIAS_RPL (ceill, long double, (long double x)); | |
480 | # else | |
481 | # if !@HAVE_DECL_CEILL@ | |
482 | # undef ceill | |
483 | _GL_FUNCDECL_SYS (ceill, long double, (long double x)); | |
484 | # endif | |
485 | _GL_CXXALIAS_SYS (ceill, long double, (long double x)); | |
486 | # endif | |
487 | _GL_CXXALIASWARN (ceill); | |
488 | #elif defined GNULIB_POSIXCHECK | |
489 | # undef ceill | |
490 | # if HAVE_RAW_DECL_CEILL | |
491 | _GL_WARN_ON_USE (ceill, "ceill is unportable - " | |
492 | "use gnulib module ceill for portability"); | |
493 | # endif | |
494 | #endif | |
495 | ||
496 | ||
497 | #if @GNULIB_COPYSIGNF@ | |
498 | # if !@HAVE_DECL_COPYSIGNF@ | |
499 | _GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); | |
500 | # endif | |
501 | _GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); | |
502 | _GL_CXXALIASWARN (copysignf); | |
503 | #elif defined GNULIB_POSIXCHECK | |
504 | # undef copysignf | |
505 | # if HAVE_RAW_DECL_COPYSIGNF | |
506 | _GL_WARN_ON_USE (copysignf, "copysignf is unportable - " | |
507 | "use gnulib module copysignf for portability"); | |
508 | # endif | |
509 | #endif | |
510 | ||
511 | #if @GNULIB_COPYSIGN@ | |
512 | # if !@HAVE_COPYSIGN@ | |
513 | _GL_FUNCDECL_SYS (copysign, double, (double x, double y)); | |
514 | # endif | |
515 | _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); | |
516 | _GL_CXXALIASWARN (copysign); | |
517 | #elif defined GNULIB_POSIXCHECK | |
518 | # undef copysign | |
519 | # if HAVE_RAW_DECL_COPYSIGN | |
520 | _GL_WARN_ON_USE (copysign, "copysign is unportable - " | |
521 | "use gnulib module copysign for portability"); | |
522 | # endif | |
523 | #endif | |
524 | ||
525 | #if @GNULIB_COPYSIGNL@ | |
526 | # if !@HAVE_COPYSIGNL@ | |
527 | _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); | |
528 | # endif | |
529 | _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); | |
530 | _GL_CXXALIASWARN (copysignl); | |
531 | #elif defined GNULIB_POSIXCHECK | |
532 | # undef copysignl | |
533 | # if HAVE_RAW_DECL_COPYSIGNL | |
534 | _GL_WARN_ON_USE (copysign, "copysignl is unportable - " | |
535 | "use gnulib module copysignl for portability"); | |
536 | # endif | |
537 | #endif | |
538 | ||
539 | ||
540 | #if @GNULIB_COSF@ | |
7a6dbc2f SDJ |
541 | # if @REPLACE_COSF@ |
542 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
543 | # undef cosf | |
544 | # define cosf rpl_cosf | |
545 | # endif | |
546 | _GL_FUNCDECL_RPL (cosf, float, (float x)); | |
547 | _GL_CXXALIAS_RPL (cosf, float, (float x)); | |
548 | # else | |
549 | # if !@HAVE_COSF@ | |
550 | # undef cosf | |
88b48903 | 551 | _GL_FUNCDECL_SYS (cosf, float, (float x)); |
7a6dbc2f | 552 | # endif |
88b48903 | 553 | _GL_CXXALIAS_SYS (cosf, float, (float x)); |
7a6dbc2f | 554 | # endif |
88b48903 WN |
555 | _GL_CXXALIASWARN (cosf); |
556 | #elif defined GNULIB_POSIXCHECK | |
557 | # undef cosf | |
558 | # if HAVE_RAW_DECL_COSF | |
559 | _GL_WARN_ON_USE (cosf, "cosf is unportable - " | |
560 | "use gnulib module cosf for portability"); | |
561 | # endif | |
562 | #endif | |
563 | ||
564 | #if @GNULIB_COSL@ | |
565 | # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ | |
566 | # undef cosl | |
567 | _GL_FUNCDECL_SYS (cosl, long double, (long double x)); | |
568 | # endif | |
569 | _GL_CXXALIAS_SYS (cosl, long double, (long double x)); | |
570 | _GL_CXXALIASWARN (cosl); | |
571 | #elif defined GNULIB_POSIXCHECK | |
572 | # undef cosl | |
573 | # if HAVE_RAW_DECL_COSL | |
574 | _GL_WARN_ON_USE (cosl, "cosl is unportable - " | |
575 | "use gnulib module cosl for portability"); | |
576 | # endif | |
577 | #endif | |
578 | ||
579 | ||
580 | #if @GNULIB_COSHF@ | |
7a6dbc2f SDJ |
581 | # if @REPLACE_COSHF@ |
582 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
583 | # undef coshf | |
584 | # define coshf rpl_coshf | |
585 | # endif | |
586 | _GL_FUNCDECL_RPL (coshf, float, (float x)); | |
587 | _GL_CXXALIAS_RPL (coshf, float, (float x)); | |
588 | # else | |
589 | # if !@HAVE_COSHF@ | |
590 | # undef coshf | |
88b48903 | 591 | _GL_FUNCDECL_SYS (coshf, float, (float x)); |
7a6dbc2f | 592 | # endif |
88b48903 | 593 | _GL_CXXALIAS_SYS (coshf, float, (float x)); |
7a6dbc2f | 594 | # endif |
88b48903 WN |
595 | _GL_CXXALIASWARN (coshf); |
596 | #elif defined GNULIB_POSIXCHECK | |
597 | # undef coshf | |
598 | # if HAVE_RAW_DECL_COSHF | |
599 | _GL_WARN_ON_USE (coshf, "coshf is unportable - " | |
600 | "use gnulib module coshf for portability"); | |
601 | # endif | |
602 | #endif | |
603 | ||
604 | ||
605 | #if @GNULIB_EXPF@ | |
7a6dbc2f SDJ |
606 | # if @REPLACE_EXPF@ |
607 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
608 | # undef expf | |
609 | # define expf rpl_expf | |
610 | # endif | |
611 | _GL_FUNCDECL_RPL (expf, float, (float x)); | |
612 | _GL_CXXALIAS_RPL (expf, float, (float x)); | |
613 | # else | |
614 | # if !@HAVE_EXPF@ | |
615 | # undef expf | |
88b48903 | 616 | _GL_FUNCDECL_SYS (expf, float, (float x)); |
7a6dbc2f | 617 | # endif |
88b48903 | 618 | _GL_CXXALIAS_SYS (expf, float, (float x)); |
7a6dbc2f | 619 | # endif |
88b48903 WN |
620 | _GL_CXXALIASWARN (expf); |
621 | #elif defined GNULIB_POSIXCHECK | |
622 | # undef expf | |
623 | # if HAVE_RAW_DECL_EXPF | |
624 | _GL_WARN_ON_USE (expf, "expf is unportable - " | |
625 | "use gnulib module expf for portability"); | |
626 | # endif | |
627 | #endif | |
628 | ||
629 | #if @GNULIB_EXPL@ | |
630 | # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ | |
631 | # undef expl | |
632 | _GL_FUNCDECL_SYS (expl, long double, (long double x)); | |
633 | # endif | |
634 | _GL_CXXALIAS_SYS (expl, long double, (long double x)); | |
635 | _GL_CXXALIASWARN (expl); | |
636 | #elif defined GNULIB_POSIXCHECK | |
637 | # undef expl | |
638 | # if HAVE_RAW_DECL_EXPL | |
639 | _GL_WARN_ON_USE (expl, "expl is unportable - " | |
640 | "use gnulib module expl for portability"); | |
641 | # endif | |
642 | #endif | |
643 | ||
644 | ||
645 | #if @GNULIB_EXP2F@ | |
646 | # if !@HAVE_DECL_EXP2F@ | |
647 | _GL_FUNCDECL_SYS (exp2f, float, (float x)); | |
648 | # endif | |
649 | _GL_CXXALIAS_SYS (exp2f, float, (float x)); | |
650 | _GL_CXXALIASWARN (exp2f); | |
651 | #elif defined GNULIB_POSIXCHECK | |
652 | # undef exp2f | |
653 | # if HAVE_RAW_DECL_EXP2F | |
654 | _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " | |
655 | "use gnulib module exp2f for portability"); | |
656 | # endif | |
657 | #endif | |
658 | ||
659 | #if @GNULIB_EXP2@ | |
660 | # if @REPLACE_EXP2@ | |
661 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
662 | # undef exp2 | |
663 | # define exp2 rpl_exp2 | |
664 | # endif | |
665 | _GL_FUNCDECL_RPL (exp2, double, (double x)); | |
666 | _GL_CXXALIAS_RPL (exp2, double, (double x)); | |
667 | # else | |
668 | # if !@HAVE_DECL_EXP2@ | |
669 | _GL_FUNCDECL_SYS (exp2, double, (double x)); | |
670 | # endif | |
671 | _GL_CXXALIAS_SYS (exp2, double, (double x)); | |
672 | # endif | |
673 | _GL_CXXALIASWARN (exp2); | |
674 | #elif defined GNULIB_POSIXCHECK | |
675 | # undef exp2 | |
676 | # if HAVE_RAW_DECL_EXP2 | |
677 | _GL_WARN_ON_USE (exp2, "exp2 is unportable - " | |
678 | "use gnulib module exp2 for portability"); | |
679 | # endif | |
680 | #endif | |
681 | ||
682 | #if @GNULIB_EXP2L@ | |
683 | # if @REPLACE_EXP2L@ | |
684 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
685 | # undef exp2l | |
686 | # define exp2l rpl_exp2l | |
687 | # endif | |
688 | _GL_FUNCDECL_RPL (exp2l, long double, (long double x)); | |
689 | _GL_CXXALIAS_RPL (exp2l, long double, (long double x)); | |
690 | # else | |
691 | # if !@HAVE_DECL_EXP2L@ | |
692 | # undef exp2l | |
693 | _GL_FUNCDECL_SYS (exp2l, long double, (long double x)); | |
694 | # endif | |
695 | _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); | |
696 | # endif | |
697 | _GL_CXXALIASWARN (exp2l); | |
698 | #elif defined GNULIB_POSIXCHECK | |
699 | # undef exp2l | |
700 | # if HAVE_RAW_DECL_EXP2L | |
701 | _GL_WARN_ON_USE (exp2l, "exp2l is unportable - " | |
702 | "use gnulib module exp2l for portability"); | |
703 | # endif | |
704 | #endif | |
705 | ||
706 | ||
707 | #if @GNULIB_EXPM1F@ | |
708 | # if @REPLACE_EXPM1F@ | |
709 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
710 | # undef expm1f | |
711 | # define expm1f rpl_expm1f | |
712 | # endif | |
713 | _GL_FUNCDECL_RPL (expm1f, float, (float x)); | |
714 | _GL_CXXALIAS_RPL (expm1f, float, (float x)); | |
715 | # else | |
716 | # if !@HAVE_EXPM1F@ | |
717 | _GL_FUNCDECL_SYS (expm1f, float, (float x)); | |
718 | # endif | |
719 | _GL_CXXALIAS_SYS (expm1f, float, (float x)); | |
720 | # endif | |
721 | _GL_CXXALIASWARN (expm1f); | |
722 | #elif defined GNULIB_POSIXCHECK | |
723 | # undef expm1f | |
724 | # if HAVE_RAW_DECL_EXPM1F | |
725 | _GL_WARN_ON_USE (expm1f, "expm1f is unportable - " | |
726 | "use gnulib module expm1f for portability"); | |
727 | # endif | |
728 | #endif | |
729 | ||
730 | #if @GNULIB_EXPM1@ | |
731 | # if @REPLACE_EXPM1@ | |
732 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
733 | # undef expm1 | |
734 | # define expm1 rpl_expm1 | |
735 | # endif | |
736 | _GL_FUNCDECL_RPL (expm1, double, (double x)); | |
737 | _GL_CXXALIAS_RPL (expm1, double, (double x)); | |
738 | # else | |
739 | # if !@HAVE_EXPM1@ | |
740 | _GL_FUNCDECL_SYS (expm1, double, (double x)); | |
741 | # endif | |
742 | _GL_CXXALIAS_SYS (expm1, double, (double x)); | |
743 | # endif | |
744 | _GL_CXXALIASWARN (expm1); | |
745 | #elif defined GNULIB_POSIXCHECK | |
746 | # undef expm1 | |
747 | # if HAVE_RAW_DECL_EXPM1 | |
748 | _GL_WARN_ON_USE (expm1, "expm1 is unportable - " | |
749 | "use gnulib module expm1 for portability"); | |
750 | # endif | |
751 | #endif | |
752 | ||
753 | #if @GNULIB_EXPM1L@ | |
754 | # if !@HAVE_DECL_EXPM1L@ | |
755 | # undef expm1l | |
756 | _GL_FUNCDECL_SYS (expm1l, long double, (long double x)); | |
757 | # endif | |
758 | _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); | |
759 | _GL_CXXALIASWARN (expm1l); | |
760 | #elif defined GNULIB_POSIXCHECK | |
761 | # undef expm1l | |
762 | # if HAVE_RAW_DECL_EXPM1L | |
763 | _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " | |
764 | "use gnulib module expm1l for portability"); | |
765 | # endif | |
766 | #endif | |
767 | ||
768 | ||
769 | #if @GNULIB_FABSF@ | |
770 | # if !@HAVE_FABSF@ | |
771 | # undef fabsf | |
772 | _GL_FUNCDECL_SYS (fabsf, float, (float x)); | |
773 | # endif | |
774 | _GL_CXXALIAS_SYS (fabsf, float, (float x)); | |
775 | _GL_CXXALIASWARN (fabsf); | |
776 | #elif defined GNULIB_POSIXCHECK | |
777 | # undef fabsf | |
778 | # if HAVE_RAW_DECL_FABSF | |
779 | _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " | |
780 | "use gnulib module fabsf for portability"); | |
781 | # endif | |
782 | #endif | |
783 | ||
784 | #if @GNULIB_FABSL@ | |
785 | # if @REPLACE_FABSL@ | |
786 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
787 | # undef fabsl | |
788 | # define fabsl rpl_fabsl | |
789 | # endif | |
790 | _GL_FUNCDECL_RPL (fabsl, long double, (long double x)); | |
791 | _GL_CXXALIAS_RPL (fabsl, long double, (long double x)); | |
792 | # else | |
793 | # if !@HAVE_FABSL@ | |
794 | # undef fabsl | |
795 | _GL_FUNCDECL_SYS (fabsl, long double, (long double x)); | |
796 | # endif | |
797 | _GL_CXXALIAS_SYS (fabsl, long double, (long double x)); | |
798 | # endif | |
799 | _GL_CXXALIASWARN (fabsl); | |
800 | #elif defined GNULIB_POSIXCHECK | |
801 | # undef fabsl | |
802 | # if HAVE_RAW_DECL_FABSL | |
803 | _GL_WARN_ON_USE (fabsl, "fabsl is unportable - " | |
804 | "use gnulib module fabsl for portability"); | |
805 | # endif | |
806 | #endif | |
807 | ||
808 | ||
809 | #if @GNULIB_FLOORF@ | |
810 | # if @REPLACE_FLOORF@ | |
811 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
812 | # undef floorf | |
813 | # define floorf rpl_floorf | |
814 | # endif | |
815 | _GL_FUNCDECL_RPL (floorf, float, (float x)); | |
816 | _GL_CXXALIAS_RPL (floorf, float, (float x)); | |
817 | # else | |
818 | # if !@HAVE_DECL_FLOORF@ | |
819 | # undef floorf | |
820 | _GL_FUNCDECL_SYS (floorf, float, (float x)); | |
821 | # endif | |
822 | _GL_CXXALIAS_SYS (floorf, float, (float x)); | |
823 | # endif | |
824 | _GL_CXXALIASWARN (floorf); | |
825 | #elif defined GNULIB_POSIXCHECK | |
826 | # undef floorf | |
827 | # if HAVE_RAW_DECL_FLOORF | |
828 | _GL_WARN_ON_USE (floorf, "floorf is unportable - " | |
829 | "use gnulib module floorf for portability"); | |
830 | # endif | |
831 | #endif | |
832 | ||
833 | #if @GNULIB_FLOOR@ | |
834 | # if @REPLACE_FLOOR@ | |
835 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 836 | # undef floor |
88b48903 WN |
837 | # define floor rpl_floor |
838 | # endif | |
839 | _GL_FUNCDECL_RPL (floor, double, (double x)); | |
840 | _GL_CXXALIAS_RPL (floor, double, (double x)); | |
841 | # else | |
842 | _GL_CXXALIAS_SYS (floor, double, (double x)); | |
843 | # endif | |
844 | _GL_CXXALIASWARN (floor); | |
845 | #endif | |
846 | ||
847 | #if @GNULIB_FLOORL@ | |
848 | # if @REPLACE_FLOORL@ | |
849 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
850 | # undef floorl | |
851 | # define floorl rpl_floorl | |
852 | # endif | |
853 | _GL_FUNCDECL_RPL (floorl, long double, (long double x)); | |
854 | _GL_CXXALIAS_RPL (floorl, long double, (long double x)); | |
855 | # else | |
856 | # if !@HAVE_DECL_FLOORL@ | |
857 | # undef floorl | |
858 | _GL_FUNCDECL_SYS (floorl, long double, (long double x)); | |
859 | # endif | |
860 | _GL_CXXALIAS_SYS (floorl, long double, (long double x)); | |
861 | # endif | |
862 | _GL_CXXALIASWARN (floorl); | |
863 | #elif defined GNULIB_POSIXCHECK | |
864 | # undef floorl | |
865 | # if HAVE_RAW_DECL_FLOORL | |
866 | _GL_WARN_ON_USE (floorl, "floorl is unportable - " | |
867 | "use gnulib module floorl for portability"); | |
868 | # endif | |
869 | #endif | |
870 | ||
871 | ||
872 | #if @GNULIB_FMAF@ | |
873 | # if @REPLACE_FMAF@ | |
874 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
875 | # undef fmaf | |
876 | # define fmaf rpl_fmaf | |
877 | # endif | |
878 | _GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); | |
879 | _GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); | |
880 | # else | |
881 | # if !@HAVE_FMAF@ | |
882 | _GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); | |
883 | # endif | |
884 | _GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); | |
885 | # endif | |
886 | _GL_CXXALIASWARN (fmaf); | |
887 | #elif defined GNULIB_POSIXCHECK | |
888 | # undef fmaf | |
889 | # if HAVE_RAW_DECL_FMAF | |
890 | _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " | |
891 | "use gnulib module fmaf for portability"); | |
892 | # endif | |
893 | #endif | |
894 | ||
895 | #if @GNULIB_FMA@ | |
896 | # if @REPLACE_FMA@ | |
897 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
898 | # undef fma | |
899 | # define fma rpl_fma | |
900 | # endif | |
901 | _GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); | |
902 | _GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); | |
903 | # else | |
904 | # if !@HAVE_FMA@ | |
905 | _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); | |
906 | # endif | |
907 | _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); | |
908 | # endif | |
909 | _GL_CXXALIASWARN (fma); | |
910 | #elif defined GNULIB_POSIXCHECK | |
911 | # undef fma | |
912 | # if HAVE_RAW_DECL_FMA | |
913 | _GL_WARN_ON_USE (fma, "fma is unportable - " | |
914 | "use gnulib module fma for portability"); | |
915 | # endif | |
916 | #endif | |
917 | ||
918 | #if @GNULIB_FMAL@ | |
919 | # if @REPLACE_FMAL@ | |
920 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
921 | # undef fmal | |
922 | # define fmal rpl_fmal | |
923 | # endif | |
924 | _GL_FUNCDECL_RPL (fmal, long double, | |
925 | (long double x, long double y, long double z)); | |
926 | _GL_CXXALIAS_RPL (fmal, long double, | |
927 | (long double x, long double y, long double z)); | |
928 | # else | |
929 | # if !@HAVE_FMAL@ | |
930 | # undef fmal | |
931 | _GL_FUNCDECL_SYS (fmal, long double, | |
932 | (long double x, long double y, long double z)); | |
933 | # endif | |
934 | _GL_CXXALIAS_SYS (fmal, long double, | |
935 | (long double x, long double y, long double z)); | |
936 | # endif | |
937 | _GL_CXXALIASWARN (fmal); | |
938 | #elif defined GNULIB_POSIXCHECK | |
939 | # undef fmal | |
940 | # if HAVE_RAW_DECL_FMAL | |
941 | _GL_WARN_ON_USE (fmal, "fmal is unportable - " | |
942 | "use gnulib module fmal for portability"); | |
943 | # endif | |
944 | #endif | |
945 | ||
946 | ||
947 | #if @GNULIB_FMODF@ | |
948 | # if @REPLACE_FMODF@ | |
949 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
950 | # undef fmodf | |
951 | # define fmodf rpl_fmodf | |
952 | # endif | |
953 | _GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); | |
954 | _GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); | |
955 | # else | |
956 | # if !@HAVE_FMODF@ | |
957 | # undef fmodf | |
958 | _GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); | |
959 | # endif | |
960 | _GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); | |
961 | # endif | |
962 | _GL_CXXALIASWARN (fmodf); | |
963 | #elif defined GNULIB_POSIXCHECK | |
964 | # undef fmodf | |
965 | # if HAVE_RAW_DECL_FMODF | |
966 | _GL_WARN_ON_USE (fmodf, "fmodf is unportable - " | |
967 | "use gnulib module fmodf for portability"); | |
968 | # endif | |
969 | #endif | |
970 | ||
971 | #if @GNULIB_FMOD@ | |
972 | # if @REPLACE_FMOD@ | |
973 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
974 | # undef fmod | |
975 | # define fmod rpl_fmod | |
976 | # endif | |
977 | _GL_FUNCDECL_RPL (fmod, double, (double x, double y)); | |
978 | _GL_CXXALIAS_RPL (fmod, double, (double x, double y)); | |
979 | # else | |
980 | _GL_CXXALIAS_SYS (fmod, double, (double x, double y)); | |
981 | # endif | |
982 | _GL_CXXALIASWARN (fmod); | |
983 | #elif defined GNULIB_POSIXCHECK | |
984 | # undef fmod | |
985 | # if HAVE_RAW_DECL_FMOD | |
986 | _GL_WARN_ON_USE (fmod, "fmod has portability problems - " | |
987 | "use gnulib module fmod for portability"); | |
988 | # endif | |
989 | #endif | |
990 | ||
991 | #if @GNULIB_FMODL@ | |
992 | # if @REPLACE_FMODL@ | |
993 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
994 | # undef fmodl | |
995 | # define fmodl rpl_fmodl | |
996 | # endif | |
997 | _GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); | |
998 | _GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); | |
999 | # else | |
1000 | # if !@HAVE_FMODL@ | |
1001 | # undef fmodl | |
1002 | _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); | |
1003 | # endif | |
1004 | _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); | |
1005 | # endif | |
1006 | _GL_CXXALIASWARN (fmodl); | |
1007 | #elif defined GNULIB_POSIXCHECK | |
1008 | # undef fmodl | |
1009 | # if HAVE_RAW_DECL_FMODL | |
1010 | _GL_WARN_ON_USE (fmodl, "fmodl is unportable - " | |
1011 | "use gnulib module fmodl for portability"); | |
1012 | # endif | |
1013 | #endif | |
1014 | ||
1015 | ||
1016 | /* Write x as | |
1017 | x = mantissa * 2^exp | |
1018 | where | |
1019 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1020 | If x is zero: mantissa = x, exp = 0. | |
1021 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1022 | Store exp in *EXPPTR and return mantissa. */ | |
1023 | #if @GNULIB_FREXPF@ | |
1024 | # if @REPLACE_FREXPF@ | |
1025 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1026 | # undef frexpf | |
1027 | # define frexpf rpl_frexpf | |
1028 | # endif | |
1029 | _GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1030 | _GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); | |
1031 | # else | |
1032 | # if !@HAVE_FREXPF@ | |
1033 | # undef frexpf | |
1034 | _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1035 | # endif | |
1036 | _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); | |
1037 | # endif | |
1038 | _GL_CXXALIASWARN (frexpf); | |
1039 | #elif defined GNULIB_POSIXCHECK | |
1040 | # undef frexpf | |
1041 | # if HAVE_RAW_DECL_FREXPF | |
1042 | _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " | |
1043 | "use gnulib module frexpf for portability"); | |
1044 | # endif | |
1045 | #endif | |
1046 | ||
1047 | /* Write x as | |
1048 | x = mantissa * 2^exp | |
1049 | where | |
1050 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1051 | If x is zero: mantissa = x, exp = 0. | |
1052 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1053 | Store exp in *EXPPTR and return mantissa. */ | |
1054 | #if @GNULIB_FREXP@ | |
1055 | # if @REPLACE_FREXP@ | |
1056 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 1057 | # undef frexp |
88b48903 WN |
1058 | # define frexp rpl_frexp |
1059 | # endif | |
1060 | _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1061 | _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); | |
1062 | # else | |
1063 | _GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); | |
1064 | # endif | |
4c62b19f | 1065 | _GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); |
88b48903 WN |
1066 | #elif defined GNULIB_POSIXCHECK |
1067 | # undef frexp | |
1068 | /* Assume frexp is always declared. */ | |
1069 | _GL_WARN_ON_USE (frexp, "frexp is unportable - " | |
1070 | "use gnulib module frexp for portability"); | |
1071 | #endif | |
1072 | ||
1073 | /* Write x as | |
1074 | x = mantissa * 2^exp | |
1075 | where | |
1076 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1077 | If x is zero: mantissa = x, exp = 0. | |
1078 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1079 | Store exp in *EXPPTR and return mantissa. */ | |
1080 | #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ | |
1081 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1082 | # undef frexpl | |
1083 | # define frexpl rpl_frexpl | |
1084 | # endif | |
1085 | _GL_FUNCDECL_RPL (frexpl, long double, | |
1086 | (long double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1087 | _GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); | |
1088 | #else | |
1089 | # if !@HAVE_DECL_FREXPL@ | |
1090 | _GL_FUNCDECL_SYS (frexpl, long double, | |
1091 | (long double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1092 | # endif | |
1093 | # if @GNULIB_FREXPL@ | |
1094 | _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); | |
1095 | # endif | |
1096 | #endif | |
1097 | #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) | |
1098 | _GL_CXXALIASWARN (frexpl); | |
1099 | #endif | |
1100 | #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK | |
1101 | # undef frexpl | |
1102 | # if HAVE_RAW_DECL_FREXPL | |
1103 | _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " | |
1104 | "use gnulib module frexpl for portability"); | |
1105 | # endif | |
1106 | #endif | |
1107 | ||
1108 | ||
1109 | /* Return sqrt(x^2+y^2). */ | |
1110 | #if @GNULIB_HYPOTF@ | |
1111 | # if @REPLACE_HYPOTF@ | |
1112 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1113 | # undef hypotf | |
1114 | # define hypotf rpl_hypotf | |
1115 | # endif | |
1116 | _GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); | |
1117 | _GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); | |
1118 | # else | |
1119 | # if !@HAVE_HYPOTF@ | |
1120 | _GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); | |
1121 | # endif | |
1122 | _GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); | |
1123 | # endif | |
1124 | _GL_CXXALIASWARN (hypotf); | |
1125 | #elif defined GNULIB_POSIXCHECK | |
1126 | # undef hypotf | |
1127 | # if HAVE_RAW_DECL_HYPOTF | |
1128 | _GL_WARN_ON_USE (hypotf, "hypotf is unportable - " | |
1129 | "use gnulib module hypotf for portability"); | |
1130 | # endif | |
1131 | #endif | |
1132 | ||
1133 | /* Return sqrt(x^2+y^2). */ | |
1134 | #if @GNULIB_HYPOT@ | |
1135 | # if @REPLACE_HYPOT@ | |
1136 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1137 | # undef hypot | |
1138 | # define hypot rpl_hypot | |
1139 | # endif | |
1140 | _GL_FUNCDECL_RPL (hypot, double, (double x, double y)); | |
1141 | _GL_CXXALIAS_RPL (hypot, double, (double x, double y)); | |
1142 | # else | |
1143 | _GL_CXXALIAS_SYS (hypot, double, (double x, double y)); | |
1144 | # endif | |
1145 | _GL_CXXALIASWARN (hypot); | |
1146 | #elif defined GNULIB_POSIXCHECK | |
1147 | # undef hypot | |
1148 | # if HAVE_RAW_DECL_HYPOT | |
1149 | _GL_WARN_ON_USE (hypotf, "hypot has portability problems - " | |
1150 | "use gnulib module hypot for portability"); | |
1151 | # endif | |
1152 | #endif | |
1153 | ||
1154 | /* Return sqrt(x^2+y^2). */ | |
1155 | #if @GNULIB_HYPOTL@ | |
1156 | # if @REPLACE_HYPOTL@ | |
1157 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1158 | # undef hypotl | |
1159 | # define hypotl rpl_hypotl | |
1160 | # endif | |
1161 | _GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); | |
1162 | _GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); | |
1163 | # else | |
1164 | # if !@HAVE_HYPOTL@ | |
1165 | _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); | |
1166 | # endif | |
1167 | _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); | |
1168 | # endif | |
1169 | _GL_CXXALIASWARN (hypotl); | |
1170 | #elif defined GNULIB_POSIXCHECK | |
1171 | # undef hypotl | |
1172 | # if HAVE_RAW_DECL_HYPOTL | |
1173 | _GL_WARN_ON_USE (hypotl, "hypotl is unportable - " | |
1174 | "use gnulib module hypotl for portability"); | |
1175 | # endif | |
1176 | #endif | |
1177 | ||
1178 | ||
1179 | #if @GNULIB_ILOGBF@ | |
1180 | # if @REPLACE_ILOGBF@ | |
1181 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1182 | # undef ilogbf | |
1183 | # define ilogbf rpl_ilogbf | |
1184 | # endif | |
1185 | _GL_FUNCDECL_RPL (ilogbf, int, (float x)); | |
1186 | _GL_CXXALIAS_RPL (ilogbf, int, (float x)); | |
1187 | # else | |
1188 | # if !@HAVE_ILOGBF@ | |
1189 | _GL_FUNCDECL_SYS (ilogbf, int, (float x)); | |
1190 | # endif | |
1191 | _GL_CXXALIAS_SYS (ilogbf, int, (float x)); | |
1192 | # endif | |
1193 | _GL_CXXALIASWARN (ilogbf); | |
1194 | #elif defined GNULIB_POSIXCHECK | |
1195 | # undef ilogbf | |
1196 | # if HAVE_RAW_DECL_ILOGBF | |
1197 | _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " | |
1198 | "use gnulib module ilogbf for portability"); | |
1199 | # endif | |
1200 | #endif | |
1201 | ||
1202 | #if @GNULIB_ILOGB@ | |
1203 | # if @REPLACE_ILOGB@ | |
1204 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1205 | # undef ilogb | |
1206 | # define ilogb rpl_ilogb | |
1207 | # endif | |
1208 | _GL_FUNCDECL_RPL (ilogb, int, (double x)); | |
1209 | _GL_CXXALIAS_RPL (ilogb, int, (double x)); | |
1210 | # else | |
1211 | # if !@HAVE_ILOGB@ | |
1212 | _GL_FUNCDECL_SYS (ilogb, int, (double x)); | |
1213 | # endif | |
1214 | _GL_CXXALIAS_SYS (ilogb, int, (double x)); | |
1215 | # endif | |
1216 | _GL_CXXALIASWARN (ilogb); | |
1217 | #elif defined GNULIB_POSIXCHECK | |
1218 | # undef ilogb | |
1219 | # if HAVE_RAW_DECL_ILOGB | |
1220 | _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " | |
1221 | "use gnulib module ilogb for portability"); | |
1222 | # endif | |
1223 | #endif | |
1224 | ||
1225 | #if @GNULIB_ILOGBL@ | |
7a6dbc2f SDJ |
1226 | # if @REPLACE_ILOGBL@ |
1227 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1228 | # undef ilogbl | |
1229 | # define ilogbl rpl_ilogbl | |
1230 | # endif | |
1231 | _GL_FUNCDECL_RPL (ilogbl, int, (long double x)); | |
1232 | _GL_CXXALIAS_RPL (ilogbl, int, (long double x)); | |
1233 | # else | |
1234 | # if !@HAVE_ILOGBL@ | |
88b48903 | 1235 | _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); |
7a6dbc2f | 1236 | # endif |
88b48903 | 1237 | _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); |
7a6dbc2f | 1238 | # endif |
88b48903 WN |
1239 | _GL_CXXALIASWARN (ilogbl); |
1240 | #elif defined GNULIB_POSIXCHECK | |
1241 | # undef ilogbl | |
1242 | # if HAVE_RAW_DECL_ILOGBL | |
1243 | _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " | |
1244 | "use gnulib module ilogbl for portability"); | |
1245 | # endif | |
1246 | #endif | |
1247 | ||
1248 | ||
1249 | /* Return x * 2^exp. */ | |
1250 | #if @GNULIB_LDEXPF@ | |
1251 | # if !@HAVE_LDEXPF@ | |
1252 | # undef ldexpf | |
1253 | _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); | |
1254 | # endif | |
1255 | _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); | |
1256 | _GL_CXXALIASWARN (ldexpf); | |
1257 | #elif defined GNULIB_POSIXCHECK | |
1258 | # undef ldexpf | |
1259 | # if HAVE_RAW_DECL_LDEXPF | |
1260 | _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " | |
1261 | "use gnulib module ldexpf for portability"); | |
1262 | # endif | |
1263 | #endif | |
1264 | ||
1265 | /* Return x * 2^exp. */ | |
1266 | #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ | |
1267 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1268 | # undef ldexpl | |
1269 | # define ldexpl rpl_ldexpl | |
1270 | # endif | |
1271 | _GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); | |
1272 | _GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); | |
1273 | #else | |
1274 | # if !@HAVE_DECL_LDEXPL@ | |
1275 | _GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); | |
1276 | # endif | |
1277 | # if @GNULIB_LDEXPL@ | |
1278 | _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); | |
1279 | # endif | |
1280 | #endif | |
1281 | #if @GNULIB_LDEXPL@ | |
1282 | _GL_CXXALIASWARN (ldexpl); | |
1283 | #endif | |
1284 | #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK | |
1285 | # undef ldexpl | |
1286 | # if HAVE_RAW_DECL_LDEXPL | |
1287 | _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " | |
1288 | "use gnulib module ldexpl for portability"); | |
1289 | # endif | |
1290 | #endif | |
1291 | ||
1292 | ||
1293 | #if @GNULIB_LOGF@ | |
1294 | # if @REPLACE_LOGF@ | |
1295 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1296 | # undef logf | |
1297 | # define logf rpl_logf | |
1298 | # endif | |
1299 | _GL_FUNCDECL_RPL (logf, float, (float x)); | |
1300 | _GL_CXXALIAS_RPL (logf, float, (float x)); | |
1301 | # else | |
1302 | # if !@HAVE_LOGF@ | |
1303 | # undef logf | |
1304 | _GL_FUNCDECL_SYS (logf, float, (float x)); | |
1305 | # endif | |
1306 | _GL_CXXALIAS_SYS (logf, float, (float x)); | |
1307 | # endif | |
1308 | _GL_CXXALIASWARN (logf); | |
1309 | #elif defined GNULIB_POSIXCHECK | |
1310 | # undef logf | |
1311 | # if HAVE_RAW_DECL_LOGF | |
1312 | _GL_WARN_ON_USE (logf, "logf is unportable - " | |
1313 | "use gnulib module logf for portability"); | |
1314 | # endif | |
1315 | #endif | |
1316 | ||
1317 | #if @GNULIB_LOG@ | |
1318 | # if @REPLACE_LOG@ | |
1319 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1320 | # undef log | |
1321 | # define log rpl_log | |
1322 | # endif | |
1323 | _GL_FUNCDECL_RPL (log, double, (double x)); | |
1324 | _GL_CXXALIAS_RPL (log, double, (double x)); | |
1325 | # else | |
1326 | _GL_CXXALIAS_SYS (log, double, (double x)); | |
1327 | # endif | |
1328 | _GL_CXXALIASWARN (log); | |
1329 | #elif defined GNULIB_POSIXCHECK | |
1330 | # undef log | |
1331 | # if HAVE_RAW_DECL_LOG | |
1332 | _GL_WARN_ON_USE (log, "log has portability problems - " | |
1333 | "use gnulib module log for portability"); | |
1334 | # endif | |
1335 | #endif | |
1336 | ||
1337 | #if @GNULIB_LOGL@ | |
1338 | # if @REPLACE_LOGL@ | |
1339 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1340 | # undef logl | |
1341 | # define logl rpl_logl | |
1342 | # endif | |
1343 | _GL_FUNCDECL_RPL (logl, long double, (long double x)); | |
1344 | _GL_CXXALIAS_RPL (logl, long double, (long double x)); | |
1345 | # else | |
1346 | # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ | |
1347 | # undef logl | |
1348 | _GL_FUNCDECL_SYS (logl, long double, (long double x)); | |
1349 | # endif | |
1350 | _GL_CXXALIAS_SYS (logl, long double, (long double x)); | |
1351 | # endif | |
1352 | _GL_CXXALIASWARN (logl); | |
1353 | #elif defined GNULIB_POSIXCHECK | |
1354 | # undef logl | |
1355 | # if HAVE_RAW_DECL_LOGL | |
1356 | _GL_WARN_ON_USE (logl, "logl is unportable - " | |
1357 | "use gnulib module logl for portability"); | |
1358 | # endif | |
1359 | #endif | |
1360 | ||
1361 | ||
1362 | #if @GNULIB_LOG10F@ | |
1363 | # if @REPLACE_LOG10F@ | |
1364 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1365 | # undef log10f | |
1366 | # define log10f rpl_log10f | |
1367 | # endif | |
1368 | _GL_FUNCDECL_RPL (log10f, float, (float x)); | |
1369 | _GL_CXXALIAS_RPL (log10f, float, (float x)); | |
1370 | # else | |
1371 | # if !@HAVE_LOG10F@ | |
1372 | # undef log10f | |
1373 | _GL_FUNCDECL_SYS (log10f, float, (float x)); | |
1374 | # endif | |
1375 | _GL_CXXALIAS_SYS (log10f, float, (float x)); | |
1376 | # endif | |
1377 | _GL_CXXALIASWARN (log10f); | |
1378 | #elif defined GNULIB_POSIXCHECK | |
1379 | # undef log10f | |
1380 | # if HAVE_RAW_DECL_LOG10F | |
1381 | _GL_WARN_ON_USE (log10f, "log10f is unportable - " | |
1382 | "use gnulib module log10f for portability"); | |
1383 | # endif | |
1384 | #endif | |
1385 | ||
1386 | #if @GNULIB_LOG10@ | |
1387 | # if @REPLACE_LOG10@ | |
1388 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1389 | # undef log10 | |
1390 | # define log10 rpl_log10 | |
1391 | # endif | |
1392 | _GL_FUNCDECL_RPL (log10, double, (double x)); | |
1393 | _GL_CXXALIAS_RPL (log10, double, (double x)); | |
1394 | # else | |
1395 | _GL_CXXALIAS_SYS (log10, double, (double x)); | |
1396 | # endif | |
1397 | _GL_CXXALIASWARN (log10); | |
1398 | #elif defined GNULIB_POSIXCHECK | |
1399 | # undef log10 | |
1400 | # if HAVE_RAW_DECL_LOG10 | |
1401 | _GL_WARN_ON_USE (log10, "log10 has portability problems - " | |
1402 | "use gnulib module log10 for portability"); | |
1403 | # endif | |
1404 | #endif | |
1405 | ||
1406 | #if @GNULIB_LOG10L@ | |
1407 | # if @REPLACE_LOG10L@ | |
1408 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1409 | # undef log10l | |
1410 | # define log10l rpl_log10l | |
1411 | # endif | |
1412 | _GL_FUNCDECL_RPL (log10l, long double, (long double x)); | |
1413 | _GL_CXXALIAS_RPL (log10l, long double, (long double x)); | |
1414 | # else | |
1415 | # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@ | |
1416 | # undef log10l | |
1417 | _GL_FUNCDECL_SYS (log10l, long double, (long double x)); | |
1418 | # endif | |
1419 | _GL_CXXALIAS_SYS (log10l, long double, (long double x)); | |
1420 | # endif | |
1421 | _GL_CXXALIASWARN (log10l); | |
1422 | #elif defined GNULIB_POSIXCHECK | |
1423 | # undef log10l | |
1424 | # if HAVE_RAW_DECL_LOG10L | |
1425 | _GL_WARN_ON_USE (log10l, "log10l is unportable - " | |
1426 | "use gnulib module log10l for portability"); | |
1427 | # endif | |
1428 | #endif | |
1429 | ||
1430 | ||
1431 | #if @GNULIB_LOG1PF@ | |
1432 | # if @REPLACE_LOG1PF@ | |
1433 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1434 | # undef log1pf | |
1435 | # define log1pf rpl_log1pf | |
1436 | # endif | |
1437 | _GL_FUNCDECL_RPL (log1pf, float, (float x)); | |
1438 | _GL_CXXALIAS_RPL (log1pf, float, (float x)); | |
1439 | # else | |
1440 | # if !@HAVE_LOG1PF@ | |
1441 | _GL_FUNCDECL_SYS (log1pf, float, (float x)); | |
1442 | # endif | |
1443 | _GL_CXXALIAS_SYS (log1pf, float, (float x)); | |
1444 | # endif | |
1445 | _GL_CXXALIASWARN (log1pf); | |
1446 | #elif defined GNULIB_POSIXCHECK | |
1447 | # undef log1pf | |
1448 | # if HAVE_RAW_DECL_LOG1PF | |
1449 | _GL_WARN_ON_USE (log1pf, "log1pf is unportable - " | |
1450 | "use gnulib module log1pf for portability"); | |
1451 | # endif | |
1452 | #endif | |
1453 | ||
1454 | #if @GNULIB_LOG1P@ | |
1455 | # if @REPLACE_LOG1P@ | |
1456 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1457 | # undef log1p | |
1458 | # define log1p rpl_log1p | |
1459 | # endif | |
1460 | _GL_FUNCDECL_RPL (log1p, double, (double x)); | |
1461 | _GL_CXXALIAS_RPL (log1p, double, (double x)); | |
1462 | # else | |
1463 | # if !@HAVE_LOG1P@ | |
1464 | _GL_FUNCDECL_SYS (log1p, double, (double x)); | |
1465 | # endif | |
1466 | _GL_CXXALIAS_SYS (log1p, double, (double x)); | |
1467 | # endif | |
1468 | _GL_CXXALIASWARN (log1p); | |
1469 | #elif defined GNULIB_POSIXCHECK | |
1470 | # undef log1p | |
1471 | # if HAVE_RAW_DECL_LOG1P | |
1472 | _GL_WARN_ON_USE (log1p, "log1p has portability problems - " | |
1473 | "use gnulib module log1p for portability"); | |
1474 | # endif | |
1475 | #endif | |
1476 | ||
1477 | #if @GNULIB_LOG1PL@ | |
1478 | # if @REPLACE_LOG1PL@ | |
1479 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1480 | # undef log1pl | |
1481 | # define log1pl rpl_log1pl | |
1482 | # endif | |
1483 | _GL_FUNCDECL_RPL (log1pl, long double, (long double x)); | |
1484 | _GL_CXXALIAS_RPL (log1pl, long double, (long double x)); | |
1485 | # else | |
1486 | # if !@HAVE_LOG1PL@ | |
1487 | _GL_FUNCDECL_SYS (log1pl, long double, (long double x)); | |
1488 | # endif | |
1489 | _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); | |
1490 | # endif | |
1491 | _GL_CXXALIASWARN (log1pl); | |
1492 | #elif defined GNULIB_POSIXCHECK | |
1493 | # undef log1pl | |
1494 | # if HAVE_RAW_DECL_LOG1PL | |
1495 | _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " | |
1496 | "use gnulib module log1pl for portability"); | |
1497 | # endif | |
1498 | #endif | |
1499 | ||
1500 | ||
1501 | #if @GNULIB_LOG2F@ | |
1502 | # if @REPLACE_LOG2F@ | |
1503 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1504 | # undef log2f | |
1505 | # define log2f rpl_log2f | |
1506 | # endif | |
1507 | _GL_FUNCDECL_RPL (log2f, float, (float x)); | |
1508 | _GL_CXXALIAS_RPL (log2f, float, (float x)); | |
1509 | # else | |
1510 | # if !@HAVE_DECL_LOG2F@ | |
1511 | # undef log2f | |
1512 | _GL_FUNCDECL_SYS (log2f, float, (float x)); | |
1513 | # endif | |
1514 | _GL_CXXALIAS_SYS (log2f, float, (float x)); | |
1515 | # endif | |
1516 | _GL_CXXALIASWARN (log2f); | |
1517 | #elif defined GNULIB_POSIXCHECK | |
1518 | # undef log2f | |
1519 | # if HAVE_RAW_DECL_LOG2F | |
1520 | _GL_WARN_ON_USE (log2f, "log2f is unportable - " | |
1521 | "use gnulib module log2f for portability"); | |
1522 | # endif | |
1523 | #endif | |
1524 | ||
1525 | #if @GNULIB_LOG2@ | |
1526 | # if @REPLACE_LOG2@ | |
1527 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1528 | # undef log2 | |
1529 | # define log2 rpl_log2 | |
1530 | # endif | |
1531 | _GL_FUNCDECL_RPL (log2, double, (double x)); | |
1532 | _GL_CXXALIAS_RPL (log2, double, (double x)); | |
1533 | # else | |
1534 | # if !@HAVE_DECL_LOG2@ | |
1535 | # undef log2 | |
1536 | _GL_FUNCDECL_SYS (log2, double, (double x)); | |
1537 | # endif | |
1538 | _GL_CXXALIAS_SYS (log2, double, (double x)); | |
1539 | # endif | |
1540 | _GL_CXXALIASWARN (log2); | |
1541 | #elif defined GNULIB_POSIXCHECK | |
1542 | # undef log2 | |
1543 | # if HAVE_RAW_DECL_LOG2 | |
1544 | _GL_WARN_ON_USE (log2, "log2 is unportable - " | |
1545 | "use gnulib module log2 for portability"); | |
1546 | # endif | |
1547 | #endif | |
1548 | ||
1549 | #if @GNULIB_LOG2L@ | |
1550 | # if @REPLACE_LOG2L@ | |
1551 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1552 | # undef log2l | |
1553 | # define log2l rpl_log2l | |
1554 | # endif | |
1555 | _GL_FUNCDECL_RPL (log2l, long double, (long double x)); | |
1556 | _GL_CXXALIAS_RPL (log2l, long double, (long double x)); | |
1557 | # else | |
1558 | # if !@HAVE_DECL_LOG2L@ | |
1559 | _GL_FUNCDECL_SYS (log2l, long double, (long double x)); | |
1560 | # endif | |
1561 | _GL_CXXALIAS_SYS (log2l, long double, (long double x)); | |
1562 | # endif | |
1563 | _GL_CXXALIASWARN (log2l); | |
1564 | #elif defined GNULIB_POSIXCHECK | |
1565 | # undef log2l | |
1566 | # if HAVE_RAW_DECL_LOG2L | |
1567 | _GL_WARN_ON_USE (log2l, "log2l is unportable - " | |
1568 | "use gnulib module log2l for portability"); | |
1569 | # endif | |
1570 | #endif | |
1571 | ||
1572 | ||
1573 | #if @GNULIB_LOGBF@ | |
1574 | # if @REPLACE_LOGBF@ | |
1575 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1576 | # undef logbf | |
1577 | # define logbf rpl_logbf | |
1578 | # endif | |
1579 | _GL_FUNCDECL_RPL (logbf, float, (float x)); | |
1580 | _GL_CXXALIAS_RPL (logbf, float, (float x)); | |
1581 | # else | |
1582 | # if !@HAVE_LOGBF@ | |
1583 | _GL_FUNCDECL_SYS (logbf, float, (float x)); | |
1584 | # endif | |
1585 | _GL_CXXALIAS_SYS (logbf, float, (float x)); | |
1586 | # endif | |
1587 | _GL_CXXALIASWARN (logbf); | |
1588 | #elif defined GNULIB_POSIXCHECK | |
1589 | # undef logbf | |
1590 | # if HAVE_RAW_DECL_LOGBF | |
1591 | _GL_WARN_ON_USE (logbf, "logbf is unportable - " | |
1592 | "use gnulib module logbf for portability"); | |
1593 | # endif | |
1594 | #endif | |
1595 | ||
1596 | #if @GNULIB_LOGB@ | |
1597 | # if @REPLACE_LOGB@ | |
1598 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1599 | # undef logb | |
1600 | # define logb rpl_logb | |
1601 | # endif | |
1602 | _GL_FUNCDECL_RPL (logb, double, (double x)); | |
1603 | _GL_CXXALIAS_RPL (logb, double, (double x)); | |
1604 | # else | |
1605 | # if !@HAVE_DECL_LOGB@ | |
1606 | _GL_FUNCDECL_SYS (logb, double, (double x)); | |
1607 | # endif | |
1608 | _GL_CXXALIAS_SYS (logb, double, (double x)); | |
1609 | # endif | |
1610 | _GL_CXXALIASWARN (logb); | |
1611 | #elif defined GNULIB_POSIXCHECK | |
1612 | # undef logb | |
1613 | # if HAVE_RAW_DECL_LOGB | |
1614 | _GL_WARN_ON_USE (logb, "logb is unportable - " | |
1615 | "use gnulib module logb for portability"); | |
1616 | # endif | |
1617 | #endif | |
1618 | ||
1619 | #if @GNULIB_LOGBL@ | |
1620 | # if @REPLACE_LOGBL@ | |
1621 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1622 | # undef logbl | |
1623 | # define logbl rpl_logbl | |
1624 | # endif | |
1625 | _GL_FUNCDECL_RPL (logbl, long double, (long double x)); | |
1626 | _GL_CXXALIAS_RPL (logbl, long double, (long double x)); | |
1627 | # else | |
1628 | # if !@HAVE_LOGBL@ | |
1629 | _GL_FUNCDECL_SYS (logbl, long double, (long double x)); | |
1630 | # endif | |
1631 | _GL_CXXALIAS_SYS (logbl, long double, (long double x)); | |
1632 | # endif | |
1633 | _GL_CXXALIASWARN (logbl); | |
1634 | #elif defined GNULIB_POSIXCHECK | |
1635 | # undef logbl | |
1636 | # if HAVE_RAW_DECL_LOGBL | |
1637 | _GL_WARN_ON_USE (logbl, "logbl is unportable - " | |
1638 | "use gnulib module logbl for portability"); | |
1639 | # endif | |
1640 | #endif | |
1641 | ||
1642 | ||
1643 | #if @GNULIB_MODFF@ | |
1644 | # if @REPLACE_MODFF@ | |
1645 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1646 | # undef modff | |
1647 | # define modff rpl_modff | |
1648 | # endif | |
1649 | _GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); | |
1650 | _GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); | |
1651 | # else | |
1652 | # if !@HAVE_MODFF@ | |
1653 | # undef modff | |
1654 | _GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); | |
1655 | # endif | |
1656 | _GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); | |
1657 | # endif | |
1658 | _GL_CXXALIASWARN (modff); | |
1659 | #elif defined GNULIB_POSIXCHECK | |
1660 | # undef modff | |
1661 | # if HAVE_RAW_DECL_MODFF | |
1662 | _GL_WARN_ON_USE (modff, "modff is unportable - " | |
1663 | "use gnulib module modff for portability"); | |
1664 | # endif | |
1665 | #endif | |
1666 | ||
1667 | #if @GNULIB_MODF@ | |
1668 | # if @REPLACE_MODF@ | |
1669 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1670 | # undef modf | |
1671 | # define modf rpl_modf | |
1672 | # endif | |
1673 | _GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); | |
1674 | _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); | |
1675 | # else | |
1676 | _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); | |
1677 | # endif | |
1678 | _GL_CXXALIASWARN (modf); | |
1679 | #elif defined GNULIB_POSIXCHECK | |
1680 | # undef modf | |
1681 | # if HAVE_RAW_DECL_MODF | |
1682 | _GL_WARN_ON_USE (modf, "modf has portability problems - " | |
1683 | "use gnulib module modf for portability"); | |
1684 | # endif | |
1685 | #endif | |
1686 | ||
1687 | #if @GNULIB_MODFL@ | |
1688 | # if @REPLACE_MODFL@ | |
1689 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1690 | # undef modfl | |
1691 | # define modfl rpl_modfl | |
1692 | # endif | |
1693 | _GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) | |
1694 | _GL_ARG_NONNULL ((2))); | |
1695 | _GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); | |
1696 | # else | |
1697 | # if !@HAVE_MODFL@ | |
1698 | # undef modfl | |
1699 | _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) | |
1700 | _GL_ARG_NONNULL ((2))); | |
1701 | # endif | |
1702 | _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); | |
1703 | # endif | |
1704 | _GL_CXXALIASWARN (modfl); | |
1705 | #elif defined GNULIB_POSIXCHECK | |
1706 | # undef modfl | |
1707 | # if HAVE_RAW_DECL_MODFL | |
1708 | _GL_WARN_ON_USE (modfl, "modfl is unportable - " | |
1709 | "use gnulib module modfl for portability"); | |
1710 | # endif | |
1711 | #endif | |
1712 | ||
1713 | ||
1714 | #if @GNULIB_POWF@ | |
1715 | # if !@HAVE_POWF@ | |
1716 | # undef powf | |
1717 | _GL_FUNCDECL_SYS (powf, float, (float x, float y)); | |
1718 | # endif | |
1719 | _GL_CXXALIAS_SYS (powf, float, (float x, float y)); | |
1720 | _GL_CXXALIASWARN (powf); | |
1721 | #elif defined GNULIB_POSIXCHECK | |
1722 | # undef powf | |
1723 | # if HAVE_RAW_DECL_POWF | |
1724 | _GL_WARN_ON_USE (powf, "powf is unportable - " | |
1725 | "use gnulib module powf for portability"); | |
1726 | # endif | |
1727 | #endif | |
1728 | ||
1729 | ||
1730 | #if @GNULIB_REMAINDERF@ | |
1731 | # if @REPLACE_REMAINDERF@ | |
1732 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1733 | # undef remainderf | |
1734 | # define remainderf rpl_remainderf | |
1735 | # endif | |
1736 | _GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); | |
1737 | _GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); | |
1738 | # else | |
1739 | # if !@HAVE_REMAINDERF@ | |
1740 | _GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); | |
1741 | # endif | |
1742 | _GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); | |
1743 | # endif | |
1744 | _GL_CXXALIASWARN (remainderf); | |
1745 | #elif defined GNULIB_POSIXCHECK | |
1746 | # undef remainderf | |
1747 | # if HAVE_RAW_DECL_REMAINDERF | |
1748 | _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " | |
1749 | "use gnulib module remainderf for portability"); | |
1750 | # endif | |
1751 | #endif | |
1752 | ||
1753 | #if @GNULIB_REMAINDER@ | |
1754 | # if @REPLACE_REMAINDER@ | |
1755 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1756 | # undef remainder | |
1757 | # define remainder rpl_remainder | |
1758 | # endif | |
1759 | _GL_FUNCDECL_RPL (remainder, double, (double x, double y)); | |
1760 | _GL_CXXALIAS_RPL (remainder, double, (double x, double y)); | |
1761 | # else | |
1762 | # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@ | |
1763 | _GL_FUNCDECL_SYS (remainder, double, (double x, double y)); | |
1764 | # endif | |
1765 | _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); | |
1766 | # endif | |
1767 | _GL_CXXALIASWARN (remainder); | |
1768 | #elif defined GNULIB_POSIXCHECK | |
1769 | # undef remainder | |
1770 | # if HAVE_RAW_DECL_REMAINDER | |
1771 | _GL_WARN_ON_USE (remainder, "remainder is unportable - " | |
1772 | "use gnulib module remainder for portability"); | |
1773 | # endif | |
1774 | #endif | |
1775 | ||
1776 | #if @GNULIB_REMAINDERL@ | |
1777 | # if @REPLACE_REMAINDERL@ | |
1778 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1779 | # undef remainderl | |
1780 | # define remainderl rpl_remainderl | |
1781 | # endif | |
1782 | _GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); | |
1783 | _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); | |
1784 | # else | |
1785 | # if !@HAVE_DECL_REMAINDERL@ | |
1786 | # undef remainderl | |
1787 | _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); | |
1788 | # endif | |
1789 | _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); | |
1790 | # endif | |
1791 | _GL_CXXALIASWARN (remainderl); | |
1792 | #elif defined GNULIB_POSIXCHECK | |
1793 | # undef remainderl | |
1794 | # if HAVE_RAW_DECL_REMAINDERL | |
1795 | _GL_WARN_ON_USE (remainderl, "remainderl is unportable - " | |
1796 | "use gnulib module remainderl for portability"); | |
1797 | # endif | |
1798 | #endif | |
1799 | ||
1800 | ||
1801 | #if @GNULIB_RINTF@ | |
1802 | # if !@HAVE_DECL_RINTF@ | |
1803 | _GL_FUNCDECL_SYS (rintf, float, (float x)); | |
1804 | # endif | |
1805 | _GL_CXXALIAS_SYS (rintf, float, (float x)); | |
1806 | _GL_CXXALIASWARN (rintf); | |
1807 | #elif defined GNULIB_POSIXCHECK | |
1808 | # undef rintf | |
1809 | # if HAVE_RAW_DECL_RINTF | |
1810 | _GL_WARN_ON_USE (rintf, "rintf is unportable - " | |
1811 | "use gnulib module rintf for portability"); | |
1812 | # endif | |
1813 | #endif | |
1814 | ||
1815 | #if @GNULIB_RINT@ | |
1816 | # if !@HAVE_RINT@ | |
1817 | _GL_FUNCDECL_SYS (rint, double, (double x)); | |
1818 | # endif | |
1819 | _GL_CXXALIAS_SYS (rint, double, (double x)); | |
1820 | _GL_CXXALIASWARN (rint); | |
1821 | #elif defined GNULIB_POSIXCHECK | |
1822 | # undef rint | |
1823 | # if HAVE_RAW_DECL_RINT | |
1824 | _GL_WARN_ON_USE (rint, "rint is unportable - " | |
1825 | "use gnulib module rint for portability"); | |
1826 | # endif | |
1827 | #endif | |
1828 | ||
1829 | #if @GNULIB_RINTL@ | |
1830 | # if !@HAVE_RINTL@ | |
1831 | _GL_FUNCDECL_SYS (rintl, long double, (long double x)); | |
1832 | # endif | |
1833 | _GL_CXXALIAS_SYS (rintl, long double, (long double x)); | |
1834 | _GL_CXXALIASWARN (rintl); | |
1835 | #elif defined GNULIB_POSIXCHECK | |
1836 | # undef rintl | |
1837 | # if HAVE_RAW_DECL_RINTL | |
1838 | _GL_WARN_ON_USE (rintl, "rintl is unportable - " | |
1839 | "use gnulib module rintl for portability"); | |
1840 | # endif | |
1841 | #endif | |
1842 | ||
1843 | ||
1844 | #if @GNULIB_ROUNDF@ | |
1845 | # if @REPLACE_ROUNDF@ | |
1846 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1847 | # undef roundf | |
1848 | # define roundf rpl_roundf | |
1849 | # endif | |
1850 | _GL_FUNCDECL_RPL (roundf, float, (float x)); | |
1851 | _GL_CXXALIAS_RPL (roundf, float, (float x)); | |
1852 | # else | |
1853 | # if !@HAVE_DECL_ROUNDF@ | |
1854 | _GL_FUNCDECL_SYS (roundf, float, (float x)); | |
1855 | # endif | |
1856 | _GL_CXXALIAS_SYS (roundf, float, (float x)); | |
1857 | # endif | |
1858 | _GL_CXXALIASWARN (roundf); | |
1859 | #elif defined GNULIB_POSIXCHECK | |
1860 | # undef roundf | |
1861 | # if HAVE_RAW_DECL_ROUNDF | |
1862 | _GL_WARN_ON_USE (roundf, "roundf is unportable - " | |
1863 | "use gnulib module roundf for portability"); | |
1864 | # endif | |
1865 | #endif | |
1866 | ||
1867 | #if @GNULIB_ROUND@ | |
1868 | # if @REPLACE_ROUND@ | |
1869 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1870 | # undef round | |
1871 | # define round rpl_round | |
1872 | # endif | |
1873 | _GL_FUNCDECL_RPL (round, double, (double x)); | |
1874 | _GL_CXXALIAS_RPL (round, double, (double x)); | |
1875 | # else | |
1876 | # if !@HAVE_DECL_ROUND@ | |
1877 | _GL_FUNCDECL_SYS (round, double, (double x)); | |
1878 | # endif | |
1879 | _GL_CXXALIAS_SYS (round, double, (double x)); | |
1880 | # endif | |
1881 | _GL_CXXALIASWARN (round); | |
1882 | #elif defined GNULIB_POSIXCHECK | |
1883 | # undef round | |
1884 | # if HAVE_RAW_DECL_ROUND | |
1885 | _GL_WARN_ON_USE (round, "round is unportable - " | |
1886 | "use gnulib module round for portability"); | |
1887 | # endif | |
1888 | #endif | |
1889 | ||
1890 | #if @GNULIB_ROUNDL@ | |
1891 | # if @REPLACE_ROUNDL@ | |
1892 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1893 | # undef roundl | |
1894 | # define roundl rpl_roundl | |
1895 | # endif | |
1896 | _GL_FUNCDECL_RPL (roundl, long double, (long double x)); | |
1897 | _GL_CXXALIAS_RPL (roundl, long double, (long double x)); | |
1898 | # else | |
1899 | # if !@HAVE_DECL_ROUNDL@ | |
1900 | # undef roundl | |
1901 | _GL_FUNCDECL_SYS (roundl, long double, (long double x)); | |
1902 | # endif | |
1903 | _GL_CXXALIAS_SYS (roundl, long double, (long double x)); | |
1904 | # endif | |
1905 | _GL_CXXALIASWARN (roundl); | |
1906 | #elif defined GNULIB_POSIXCHECK | |
1907 | # undef roundl | |
1908 | # if HAVE_RAW_DECL_ROUNDL | |
1909 | _GL_WARN_ON_USE (roundl, "roundl is unportable - " | |
1910 | "use gnulib module roundl for portability"); | |
1911 | # endif | |
1912 | #endif | |
1913 | ||
1914 | ||
1915 | #if @GNULIB_SINF@ | |
7a6dbc2f SDJ |
1916 | # if @REPLACE_SINF@ |
1917 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1918 | # undef sinf | |
1919 | # define sinf rpl_sinf | |
1920 | # endif | |
1921 | _GL_FUNCDECL_RPL (sinf, float, (float x)); | |
1922 | _GL_CXXALIAS_RPL (sinf, float, (float x)); | |
1923 | # else | |
1924 | # if !@HAVE_SINF@ | |
1925 | # undef sinf | |
88b48903 | 1926 | _GL_FUNCDECL_SYS (sinf, float, (float x)); |
7a6dbc2f | 1927 | # endif |
88b48903 | 1928 | _GL_CXXALIAS_SYS (sinf, float, (float x)); |
7a6dbc2f | 1929 | # endif |
88b48903 WN |
1930 | _GL_CXXALIASWARN (sinf); |
1931 | #elif defined GNULIB_POSIXCHECK | |
1932 | # undef sinf | |
1933 | # if HAVE_RAW_DECL_SINF | |
1934 | _GL_WARN_ON_USE (sinf, "sinf is unportable - " | |
1935 | "use gnulib module sinf for portability"); | |
1936 | # endif | |
1937 | #endif | |
1938 | ||
1939 | #if @GNULIB_SINL@ | |
1940 | # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ | |
1941 | # undef sinl | |
1942 | _GL_FUNCDECL_SYS (sinl, long double, (long double x)); | |
1943 | # endif | |
1944 | _GL_CXXALIAS_SYS (sinl, long double, (long double x)); | |
1945 | _GL_CXXALIASWARN (sinl); | |
1946 | #elif defined GNULIB_POSIXCHECK | |
1947 | # undef sinl | |
1948 | # if HAVE_RAW_DECL_SINL | |
1949 | _GL_WARN_ON_USE (sinl, "sinl is unportable - " | |
1950 | "use gnulib module sinl for portability"); | |
1951 | # endif | |
1952 | #endif | |
1953 | ||
1954 | ||
1955 | #if @GNULIB_SINHF@ | |
7a6dbc2f SDJ |
1956 | # if @REPLACE_SINHF@ |
1957 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1958 | # undef sinhf | |
1959 | # define sinhf rpl_sinhf | |
1960 | # endif | |
1961 | _GL_FUNCDECL_RPL (sinhf, float, (float x)); | |
1962 | _GL_CXXALIAS_RPL (sinhf, float, (float x)); | |
1963 | # else | |
1964 | # if !@HAVE_SINHF@ | |
1965 | # undef sinhf | |
88b48903 | 1966 | _GL_FUNCDECL_SYS (sinhf, float, (float x)); |
7a6dbc2f | 1967 | # endif |
88b48903 | 1968 | _GL_CXXALIAS_SYS (sinhf, float, (float x)); |
7a6dbc2f | 1969 | # endif |
88b48903 WN |
1970 | _GL_CXXALIASWARN (sinhf); |
1971 | #elif defined GNULIB_POSIXCHECK | |
1972 | # undef sinhf | |
1973 | # if HAVE_RAW_DECL_SINHF | |
1974 | _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " | |
1975 | "use gnulib module sinhf for portability"); | |
1976 | # endif | |
1977 | #endif | |
1978 | ||
1979 | ||
1980 | #if @GNULIB_SQRTF@ | |
7a6dbc2f SDJ |
1981 | # if @REPLACE_SQRTF@ |
1982 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1983 | # undef sqrtf | |
1984 | # define sqrtf rpl_sqrtf | |
1985 | # endif | |
1986 | _GL_FUNCDECL_RPL (sqrtf, float, (float x)); | |
1987 | _GL_CXXALIAS_RPL (sqrtf, float, (float x)); | |
1988 | # else | |
1989 | # if !@HAVE_SQRTF@ | |
1990 | # undef sqrtf | |
88b48903 | 1991 | _GL_FUNCDECL_SYS (sqrtf, float, (float x)); |
7a6dbc2f | 1992 | # endif |
88b48903 | 1993 | _GL_CXXALIAS_SYS (sqrtf, float, (float x)); |
7a6dbc2f | 1994 | # endif |
88b48903 WN |
1995 | _GL_CXXALIASWARN (sqrtf); |
1996 | #elif defined GNULIB_POSIXCHECK | |
1997 | # undef sqrtf | |
1998 | # if HAVE_RAW_DECL_SQRTF | |
1999 | _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " | |
2000 | "use gnulib module sqrtf for portability"); | |
2001 | # endif | |
2002 | #endif | |
2003 | ||
2004 | #if @GNULIB_SQRTL@ | |
2005 | # if @REPLACE_SQRTL@ | |
2006 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2007 | # undef sqrtl | |
2008 | # define sqrtl rpl_sqrtl | |
2009 | # endif | |
2010 | _GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); | |
2011 | _GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); | |
2012 | # else | |
2013 | # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ | |
2014 | # undef sqrtl | |
2015 | _GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); | |
2016 | # endif | |
2017 | _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); | |
2018 | # endif | |
2019 | _GL_CXXALIASWARN (sqrtl); | |
2020 | #elif defined GNULIB_POSIXCHECK | |
2021 | # undef sqrtl | |
2022 | # if HAVE_RAW_DECL_SQRTL | |
2023 | _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " | |
2024 | "use gnulib module sqrtl for portability"); | |
2025 | # endif | |
2026 | #endif | |
2027 | ||
2028 | ||
2029 | #if @GNULIB_TANF@ | |
7a6dbc2f SDJ |
2030 | # if @REPLACE_TANF@ |
2031 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2032 | # undef tanf | |
2033 | # define tanf rpl_tanf | |
2034 | # endif | |
2035 | _GL_FUNCDECL_RPL (tanf, float, (float x)); | |
2036 | _GL_CXXALIAS_RPL (tanf, float, (float x)); | |
2037 | # else | |
2038 | # if !@HAVE_TANF@ | |
2039 | # undef tanf | |
88b48903 | 2040 | _GL_FUNCDECL_SYS (tanf, float, (float x)); |
7a6dbc2f | 2041 | # endif |
88b48903 | 2042 | _GL_CXXALIAS_SYS (tanf, float, (float x)); |
7a6dbc2f | 2043 | # endif |
88b48903 WN |
2044 | _GL_CXXALIASWARN (tanf); |
2045 | #elif defined GNULIB_POSIXCHECK | |
2046 | # undef tanf | |
2047 | # if HAVE_RAW_DECL_TANF | |
2048 | _GL_WARN_ON_USE (tanf, "tanf is unportable - " | |
2049 | "use gnulib module tanf for portability"); | |
2050 | # endif | |
2051 | #endif | |
2052 | ||
2053 | #if @GNULIB_TANL@ | |
2054 | # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ | |
2055 | # undef tanl | |
2056 | _GL_FUNCDECL_SYS (tanl, long double, (long double x)); | |
2057 | # endif | |
2058 | _GL_CXXALIAS_SYS (tanl, long double, (long double x)); | |
2059 | _GL_CXXALIASWARN (tanl); | |
2060 | #elif defined GNULIB_POSIXCHECK | |
2061 | # undef tanl | |
2062 | # if HAVE_RAW_DECL_TANL | |
2063 | _GL_WARN_ON_USE (tanl, "tanl is unportable - " | |
2064 | "use gnulib module tanl for portability"); | |
2065 | # endif | |
2066 | #endif | |
2067 | ||
2068 | ||
2069 | #if @GNULIB_TANHF@ | |
7a6dbc2f SDJ |
2070 | # if @REPLACE_TANHF@ |
2071 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2072 | # undef tanhf | |
2073 | # define tanhf rpl_tanhf | |
2074 | # endif | |
2075 | _GL_FUNCDECL_RPL (tanhf, float, (float x)); | |
2076 | _GL_CXXALIAS_RPL (tanhf, float, (float x)); | |
2077 | # else | |
2078 | # if !@HAVE_TANHF@ | |
2079 | # undef tanhf | |
88b48903 | 2080 | _GL_FUNCDECL_SYS (tanhf, float, (float x)); |
7a6dbc2f | 2081 | # endif |
88b48903 | 2082 | _GL_CXXALIAS_SYS (tanhf, float, (float x)); |
7a6dbc2f | 2083 | # endif |
88b48903 WN |
2084 | _GL_CXXALIASWARN (tanhf); |
2085 | #elif defined GNULIB_POSIXCHECK | |
2086 | # undef tanhf | |
2087 | # if HAVE_RAW_DECL_TANHF | |
2088 | _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " | |
2089 | "use gnulib module tanhf for portability"); | |
2090 | # endif | |
2091 | #endif | |
2092 | ||
2093 | ||
2094 | #if @GNULIB_TRUNCF@ | |
2095 | # if @REPLACE_TRUNCF@ | |
2096 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 2097 | # undef truncf |
88b48903 WN |
2098 | # define truncf rpl_truncf |
2099 | # endif | |
2100 | _GL_FUNCDECL_RPL (truncf, float, (float x)); | |
2101 | _GL_CXXALIAS_RPL (truncf, float, (float x)); | |
2102 | # else | |
2103 | # if !@HAVE_DECL_TRUNCF@ | |
2104 | _GL_FUNCDECL_SYS (truncf, float, (float x)); | |
2105 | # endif | |
2106 | _GL_CXXALIAS_SYS (truncf, float, (float x)); | |
2107 | # endif | |
2108 | _GL_CXXALIASWARN (truncf); | |
2109 | #elif defined GNULIB_POSIXCHECK | |
2110 | # undef truncf | |
2111 | # if HAVE_RAW_DECL_TRUNCF | |
2112 | _GL_WARN_ON_USE (truncf, "truncf is unportable - " | |
2113 | "use gnulib module truncf for portability"); | |
2114 | # endif | |
2115 | #endif | |
2116 | ||
2117 | #if @GNULIB_TRUNC@ | |
2118 | # if @REPLACE_TRUNC@ | |
2119 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 2120 | # undef trunc |
88b48903 WN |
2121 | # define trunc rpl_trunc |
2122 | # endif | |
2123 | _GL_FUNCDECL_RPL (trunc, double, (double x)); | |
2124 | _GL_CXXALIAS_RPL (trunc, double, (double x)); | |
2125 | # else | |
2126 | # if !@HAVE_DECL_TRUNC@ | |
2127 | _GL_FUNCDECL_SYS (trunc, double, (double x)); | |
2128 | # endif | |
2129 | _GL_CXXALIAS_SYS (trunc, double, (double x)); | |
2130 | # endif | |
2131 | _GL_CXXALIASWARN (trunc); | |
2132 | #elif defined GNULIB_POSIXCHECK | |
2133 | # undef trunc | |
2134 | # if HAVE_RAW_DECL_TRUNC | |
2135 | _GL_WARN_ON_USE (trunc, "trunc is unportable - " | |
2136 | "use gnulib module trunc for portability"); | |
2137 | # endif | |
2138 | #endif | |
2139 | ||
2140 | #if @GNULIB_TRUNCL@ | |
2141 | # if @REPLACE_TRUNCL@ | |
2142 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2143 | # undef truncl | |
2144 | # define truncl rpl_truncl | |
2145 | # endif | |
2146 | _GL_FUNCDECL_RPL (truncl, long double, (long double x)); | |
2147 | _GL_CXXALIAS_RPL (truncl, long double, (long double x)); | |
2148 | # else | |
2149 | # if !@HAVE_DECL_TRUNCL@ | |
2150 | _GL_FUNCDECL_SYS (truncl, long double, (long double x)); | |
2151 | # endif | |
2152 | _GL_CXXALIAS_SYS (truncl, long double, (long double x)); | |
2153 | # endif | |
2154 | _GL_CXXALIASWARN (truncl); | |
2155 | #elif defined GNULIB_POSIXCHECK | |
2156 | # undef truncl | |
2157 | # if HAVE_RAW_DECL_TRUNCL | |
2158 | _GL_WARN_ON_USE (truncl, "truncl is unportable - " | |
2159 | "use gnulib module truncl for portability"); | |
2160 | # endif | |
2161 | #endif | |
2162 | ||
2163 | ||
2164 | /* Definitions of function-like macros come here, after the function | |
2165 | declarations. */ | |
2166 | ||
2167 | ||
2168 | #if @GNULIB_ISFINITE@ | |
2169 | # if @REPLACE_ISFINITE@ | |
2170 | _GL_EXTERN_C int gl_isfinitef (float x); | |
2171 | _GL_EXTERN_C int gl_isfinited (double x); | |
2172 | _GL_EXTERN_C int gl_isfinitel (long double x); | |
2173 | # undef isfinite | |
2174 | # define isfinite(x) \ | |
2175 | (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ | |
2176 | sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ | |
2177 | gl_isfinitef (x)) | |
2178 | # endif | |
2179 | # ifdef __cplusplus | |
4c62b19f | 2180 | # if defined isfinite || defined GNULIB_NAMESPACE |
88b48903 WN |
2181 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) |
2182 | # undef isfinite | |
2183 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite) | |
2184 | # endif | |
2185 | # endif | |
2186 | #elif defined GNULIB_POSIXCHECK | |
2187 | # if defined isfinite | |
2188 | _GL_WARN_REAL_FLOATING_DECL (isfinite); | |
2189 | # undef isfinite | |
2190 | # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) | |
2191 | # endif | |
2192 | #endif | |
2193 | ||
2194 | ||
2195 | #if @GNULIB_ISINF@ | |
2196 | # if @REPLACE_ISINF@ | |
2197 | _GL_EXTERN_C int gl_isinff (float x); | |
2198 | _GL_EXTERN_C int gl_isinfd (double x); | |
2199 | _GL_EXTERN_C int gl_isinfl (long double x); | |
2200 | # undef isinf | |
2201 | # define isinf(x) \ | |
2202 | (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ | |
2203 | sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ | |
2204 | gl_isinff (x)) | |
2205 | # endif | |
2206 | # ifdef __cplusplus | |
4c62b19f | 2207 | # if defined isinf || defined GNULIB_NAMESPACE |
88b48903 WN |
2208 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) |
2209 | # undef isinf | |
2210 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf) | |
2211 | # endif | |
2212 | # endif | |
2213 | #elif defined GNULIB_POSIXCHECK | |
2214 | # if defined isinf | |
2215 | _GL_WARN_REAL_FLOATING_DECL (isinf); | |
2216 | # undef isinf | |
2217 | # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) | |
2218 | # endif | |
2219 | #endif | |
2220 | ||
2221 | ||
2222 | #if @GNULIB_ISNANF@ | |
2223 | /* Test for NaN for 'float' numbers. */ | |
2224 | # if @HAVE_ISNANF@ | |
2225 | /* The original <math.h> included above provides a declaration of isnan macro | |
2226 | or (older) isnanf function. */ | |
2227 | # if __GNUC__ >= 4 | |
2228 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | |
2229 | # undef isnanf | |
2230 | # define isnanf(x) __builtin_isnanf ((float)(x)) | |
2231 | # elif defined isnan | |
2232 | # undef isnanf | |
2233 | # define isnanf(x) isnan ((float)(x)) | |
2234 | # endif | |
2235 | # else | |
2236 | /* Test whether X is a NaN. */ | |
2237 | # undef isnanf | |
2238 | # define isnanf rpl_isnanf | |
2239 | _GL_EXTERN_C int isnanf (float x); | |
2240 | # endif | |
2241 | #endif | |
2242 | ||
2243 | #if @GNULIB_ISNAND@ | |
2244 | /* Test for NaN for 'double' numbers. | |
2245 | This function is a gnulib extension, unlike isnan() which applied only | |
2246 | to 'double' numbers earlier but now is a type-generic macro. */ | |
2247 | # if @HAVE_ISNAND@ | |
2248 | /* The original <math.h> included above provides a declaration of isnan | |
2249 | macro. */ | |
2250 | # if __GNUC__ >= 4 | |
2251 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | |
2252 | # undef isnand | |
2253 | # define isnand(x) __builtin_isnan ((double)(x)) | |
2254 | # else | |
2255 | # undef isnand | |
2256 | # define isnand(x) isnan ((double)(x)) | |
2257 | # endif | |
2258 | # else | |
2259 | /* Test whether X is a NaN. */ | |
2260 | # undef isnand | |
2261 | # define isnand rpl_isnand | |
2262 | _GL_EXTERN_C int isnand (double x); | |
2263 | # endif | |
2264 | #endif | |
2265 | ||
2266 | #if @GNULIB_ISNANL@ | |
2267 | /* Test for NaN for 'long double' numbers. */ | |
2268 | # if @HAVE_ISNANL@ | |
2269 | /* The original <math.h> included above provides a declaration of isnan | |
2270 | macro or (older) isnanl function. */ | |
2271 | # if __GNUC__ >= 4 | |
2272 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | |
2273 | # undef isnanl | |
2274 | # define isnanl(x) __builtin_isnanl ((long double)(x)) | |
2275 | # elif defined isnan | |
2276 | # undef isnanl | |
2277 | # define isnanl(x) isnan ((long double)(x)) | |
2278 | # endif | |
2279 | # else | |
2280 | /* Test whether X is a NaN. */ | |
2281 | # undef isnanl | |
2282 | # define isnanl rpl_isnanl | |
2283 | _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; | |
2284 | # endif | |
2285 | #endif | |
2286 | ||
2287 | /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ | |
2288 | #if @GNULIB_ISNAN@ | |
2289 | # if @REPLACE_ISNAN@ | |
2290 | /* We can't just use the isnanf macro (e.g.) as exposed by | |
2291 | isnanf.h (e.g.) here, because those may end up being macros | |
2292 | that recursively expand back to isnan. So use the gnulib | |
2293 | replacements for them directly. */ | |
2294 | # if @HAVE_ISNANF@ && __GNUC__ >= 4 | |
2295 | # define gl_isnan_f(x) __builtin_isnanf ((float)(x)) | |
2296 | # else | |
2297 | _GL_EXTERN_C int rpl_isnanf (float x); | |
2298 | # define gl_isnan_f(x) rpl_isnanf (x) | |
2299 | # endif | |
2300 | # if @HAVE_ISNAND@ && __GNUC__ >= 4 | |
2301 | # define gl_isnan_d(x) __builtin_isnan ((double)(x)) | |
2302 | # else | |
2303 | _GL_EXTERN_C int rpl_isnand (double x); | |
2304 | # define gl_isnan_d(x) rpl_isnand (x) | |
2305 | # endif | |
2306 | # if @HAVE_ISNANL@ && __GNUC__ >= 4 | |
2307 | # define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) | |
2308 | # else | |
2309 | _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; | |
2310 | # define gl_isnan_l(x) rpl_isnanl (x) | |
2311 | # endif | |
2312 | # undef isnan | |
2313 | # define isnan(x) \ | |
2314 | (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ | |
2315 | sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ | |
2316 | gl_isnan_f (x)) | |
2317 | # elif __GNUC__ >= 4 | |
2318 | # undef isnan | |
2319 | # define isnan(x) \ | |
2320 | (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ | |
2321 | sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ | |
2322 | __builtin_isnanf ((float)(x))) | |
2323 | # endif | |
2324 | # ifdef __cplusplus | |
4c62b19f | 2325 | # if defined isnan || defined GNULIB_NAMESPACE |
88b48903 WN |
2326 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) |
2327 | # undef isnan | |
2328 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan) | |
2329 | # endif | |
2330 | # else | |
2331 | /* Ensure isnan is a macro. */ | |
2332 | # ifndef isnan | |
2333 | # define isnan isnan | |
2334 | # endif | |
2335 | # endif | |
2336 | #elif defined GNULIB_POSIXCHECK | |
2337 | # if defined isnan | |
2338 | _GL_WARN_REAL_FLOATING_DECL (isnan); | |
2339 | # undef isnan | |
2340 | # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) | |
2341 | # endif | |
2342 | #endif | |
2343 | ||
2344 | ||
2345 | #if @GNULIB_SIGNBIT@ | |
49e4877c PA |
2346 | # if (@REPLACE_SIGNBIT_USING_GCC@ \ |
2347 | && (!defined __cplusplus || __cplusplus < 201103)) | |
88b48903 WN |
2348 | # undef signbit |
2349 | /* GCC 4.0 and newer provides three built-ins for signbit. */ | |
2350 | # define signbit(x) \ | |
2351 | (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ | |
2352 | sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ | |
2353 | __builtin_signbitf (x)) | |
2354 | # endif | |
2355 | # if @REPLACE_SIGNBIT@ | |
2356 | # undef signbit | |
2357 | _GL_EXTERN_C int gl_signbitf (float arg); | |
2358 | _GL_EXTERN_C int gl_signbitd (double arg); | |
2359 | _GL_EXTERN_C int gl_signbitl (long double arg); | |
2360 | # if __GNUC__ >= 2 && !defined __STRICT_ANSI__ | |
2361 | # define _GL_NUM_UINT_WORDS(type) \ | |
2362 | ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
2363 | # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf | |
2364 | # define gl_signbitf_OPTIMIZED_MACRO | |
2365 | # define gl_signbitf(arg) \ | |
2366 | ({ union { float _value; \ | |
2367 | unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ | |
2368 | } _m; \ | |
2369 | _m._value = (arg); \ | |
2370 | (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ | |
2371 | }) | |
2372 | # endif | |
2373 | # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd | |
2374 | # define gl_signbitd_OPTIMIZED_MACRO | |
2375 | # define gl_signbitd(arg) \ | |
2376 | ({ union { double _value; \ | |
2377 | unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ | |
2378 | } _m; \ | |
2379 | _m._value = (arg); \ | |
2380 | (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ | |
2381 | }) | |
2382 | # endif | |
2383 | # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl | |
2384 | # define gl_signbitl_OPTIMIZED_MACRO | |
2385 | # define gl_signbitl(arg) \ | |
2386 | ({ union { long double _value; \ | |
2387 | unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ | |
2388 | } _m; \ | |
2389 | _m._value = (arg); \ | |
2390 | (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ | |
2391 | }) | |
2392 | # endif | |
2393 | # endif | |
2394 | # define signbit(x) \ | |
2395 | (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ | |
2396 | sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ | |
2397 | gl_signbitf (x)) | |
2398 | # endif | |
2399 | # ifdef __cplusplus | |
4c62b19f | 2400 | # if defined signbit || defined GNULIB_NAMESPACE |
88b48903 WN |
2401 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) |
2402 | # undef signbit | |
2403 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit) | |
2404 | # endif | |
2405 | # endif | |
2406 | #elif defined GNULIB_POSIXCHECK | |
2407 | # if defined signbit | |
2408 | _GL_WARN_REAL_FLOATING_DECL (signbit); | |
2409 | # undef signbit | |
2410 | # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) | |
2411 | # endif | |
2412 | #endif | |
2413 | ||
2414 | _GL_INLINE_HEADER_END | |
2415 | ||
2416 | #endif /* _@GUARD_PREFIX@_MATH_H */ | |
2417 | #endif /* _@GUARD_PREFIX@_MATH_H */ |