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. */
15 /* Solaris doesn't have the entire C99 runtime. */
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 #elif (defined(__APPLE__) && defined(__ppc__) \
23 && ! defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__))
24 /* MacOS versions before 10.3 don't have many C99 functions.
25 But, if you're including this file, you probably want to test the
26 newer behaviour, so: */
27 #error forgot to set -mmacosx-version-min.
28 #elif (defined(__APPLE__) && defined(__ppc__) \
29 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1030)
30 /* MacOS versions before 10.3 don't have many C99 functions. */
32 /* Newlib has the "f" variants of the math functions, but not the "l"
33 variants. TARGET_C99_FUNCTIONS is only defined if all C99
34 functions are present. Therefore, on systems using newlib, tests
35 of builtins will fail the "l" variants, and we should therefore not
36 define HAVE_C99_RUNTIME. Including <sys/types.h> gives us a way of
37 seeing if _NEWLIB_VERSION is defined. Including <math.h> would work
38 too, but the GLIBC math inlines cause us to generate inferior code,
39 which causes the test to fail, so it is not safe. Including <limits.h>
40 also fails because the include search paths are ordered such that GCC's
41 version will be found before the newlib version. */
42 #include <sys/types.h>
43 #ifdef _NEWLIB_VERSION
45 #define HAVE_C99_RUNTIME