Merge to HEAD at tree-cleanup-merge-20041024 .
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-config.h
blobd56cc1fb3a64610d8523266a34da2e531a3a2d7b
1 /* Copyright (C) 2003 Free Software Foundation.
3 Define macros useful in tests for bulitin functions. */
5 /* Define HAVE_C99_RUNTIME if the entire C99 runtime is available on
6 the target system. The value of HAVE_C99_RUNTIME should be the
7 same as the value of TARGET_C99_FUNCTIONS in the GCC machine
8 description. (Perhaps GCC should predefine a special macro
9 indicating whether or not TARGET_C99_FUNCTIONS is set, but it does
10 not presently do that.) */
12 #if defined(__hppa) && defined(__hpux)
13 /* PA HP-UX doesn't have the entire C99 runtime. */
14 #elif defined(__sun)
15 /* Solaris doesn't have the entire C99 runtime. */
16 #elif defined(__sgi)
17 /* Irix6 doesn't have the entire C99 runtime. */
18 #elif defined(__FreeBSD__) && (__FreeBSD__ < 5)
19 /* FreeBSD before version 5 doesn't have the entire C99 runtime. */
20 #elif defined(__netware__)
21 /* NetWare doesn't have the entire C99 runtime. */
22 #else
23 /* Newlib has the "f" variants of the math functions, but not the "l"
24 variants. TARGET_C99_FUNCTIONS is only defined if all C99
25 functions are present. Therefore, on systems using newlib, tests
26 of builtins will fail for both the "f" and the "l" variants, and we
27 should therefore not define HAVE_C99_RUNTIME. Including <limits.h>
28 gives us a way of seeing if _NEWLIB_VERSION is defined. Include
29 <math.h> would work too, but the GLIBC math inlines cause us to
30 generate inferior code, which causes the test to fail, so it is
31 not safe to include <math.h>. */
32 #include <limits.h>
33 #ifdef _NEWLIB_VERSION
34 #else
35 #define HAVE_C99_RUNTIME
36 #endif
37 #endif