OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [builtins-config.h] - Diff between revs 149 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation.
/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation.
 
 
   Define macros useful in tests for bulitin functions.  */
   Define macros useful in tests for bulitin functions.  */
 
 
/* Define HAVE_C99_RUNTIME if the entire C99 runtime is available on
/* Define HAVE_C99_RUNTIME if the entire C99 runtime is available on
   the target system.  The value of HAVE_C99_RUNTIME should be the
   the target system.  The value of HAVE_C99_RUNTIME should be the
   same as the value of TARGET_C99_FUNCTIONS in the GCC machine
   same as the value of TARGET_C99_FUNCTIONS in the GCC machine
   description.  (Perhaps GCC should predefine a special macro
   description.  (Perhaps GCC should predefine a special macro
   indicating whether or not TARGET_C99_FUNCTIONS is set, but it does
   indicating whether or not TARGET_C99_FUNCTIONS is set, but it does
   not presently do that.)  */
   not presently do that.)  */
 
 
#if defined(__hppa) && defined(__hpux)
#if defined(__hppa) && defined(__hpux)
/* PA HP-UX doesn't have the entire C99 runtime.  */
/* PA HP-UX doesn't have the entire C99 runtime.  */
#elif defined(__sgi)
#elif defined(__sgi)
/* Irix6 doesn't have the entire C99 runtime.  */
/* Irix6 doesn't have the entire C99 runtime.  */
#elif defined(__FreeBSD__) && (__FreeBSD__ < 5)
#elif defined(__FreeBSD__) && (__FreeBSD__ < 5)
/* FreeBSD before version 5 doesn't have the entire C99 runtime. */
/* FreeBSD before version 5 doesn't have the entire C99 runtime. */
#elif defined(__netware__)
#elif defined(__netware__)
/* NetWare doesn't have the entire C99 runtime.  */
/* NetWare doesn't have the entire C99 runtime.  */
#elif (defined(__APPLE__) && defined(__ppc__) \
#elif (defined(__APPLE__) && defined(__ppc__) \
       && ! defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__))
       && ! defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__))
/* MacOS versions before 10.3 don't have many C99 functions.
/* MacOS versions before 10.3 don't have many C99 functions.
   But, if you're including this file, you probably want to test the
   But, if you're including this file, you probably want to test the
   newer behaviour, so: */
   newer behaviour, so: */
#error forgot to set -mmacosx-version-min.
#error forgot to set -mmacosx-version-min.
#elif (defined(__APPLE__) && defined(__ppc__) \
#elif (defined(__APPLE__) && defined(__ppc__) \
       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1030)
       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1030)
/* MacOS versions before 10.3 don't have many C99 functions.  */
/* MacOS versions before 10.3 don't have many C99 functions.  */
#else
#else
/* Newlib has the "f" variants of the math functions, but not the "l"
/* Newlib has the "f" variants of the math functions, but not the "l"
   variants.  TARGET_C99_FUNCTIONS is only defined if all C99
   variants.  TARGET_C99_FUNCTIONS is only defined if all C99
   functions are present.  Therefore, on systems using newlib, tests
   functions are present.  Therefore, on systems using newlib, tests
   of builtins will fail the "l" variants, and we should therefore not
   of builtins will fail the "l" variants, and we should therefore not
   define HAVE_C99_RUNTIME.  Including <sys/types.h> gives us a way of
   define HAVE_C99_RUNTIME.  Including <sys/types.h> gives us a way of
   seeing if _NEWLIB_VERSION is defined.  Including <math.h> would work
   seeing if _NEWLIB_VERSION is defined.  Including <math.h> would work
   too, but the GLIBC math inlines cause us to generate inferior code,
   too, but the GLIBC math inlines cause us to generate inferior code,
   which causes the test to fail, so it is not safe.  Including <limits.h>
   which causes the test to fail, so it is not safe.  Including <limits.h>
   also fails because the include search paths are ordered such that GCC's
   also fails because the include search paths are ordered such that GCC's
   version will be found before the newlib version.  Similarly, uClibc
   version will be found before the newlib version.  Similarly, uClibc
   lacks the C99 functions.  */
   lacks the C99 functions.  */
#include <sys/types.h>
#include <sys/types.h>
#if defined(_NEWLIB_VERSION) || defined(__UCLIBC__)
#if defined(_NEWLIB_VERSION) || defined(__UCLIBC__)
#elif defined(__sun) && __STDC_VERSION__ - 0 < 199901L
#elif defined(__sun) && __STDC_VERSION__ - 0 < 199901L
/* If you're including this file, you probably want to test the newer
/* If you're including this file, you probably want to test the newer
   behaviour, so ensure the right flags were used for each test: */
   behaviour, so ensure the right flags were used for each test: */
#error forgot to set -std=c99.
#error forgot to set -std=c99.
#elif defined(__sun) && ! defined (_STDC_C99)
#elif defined(__sun) && ! defined (_STDC_C99)
/* Solaris up to 9 doesn't have the entire C99 runtime.
/* Solaris up to 9 doesn't have the entire C99 runtime.
   Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L.
   Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L.
   This macro is defined in <sys/feature_tests.h> which is included by
   This macro is defined in <sys/feature_tests.h> which is included by
   various system headers, in this case <sys/types.h> above.  */
   various system headers, in this case <sys/types.h> above.  */
#else
#else
#define HAVE_C99_RUNTIME
#define HAVE_C99_RUNTIME
#endif
#endif
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.