OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [include/] [_ansi.h] - Diff between revs 56 and 57

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

Rev 56 Rev 57
/* Provide support for both ANSI and non-ANSI environments.  */
/* Provide support for both ANSI and non-ANSI environments.  */
 
 
/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be
/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be
   relied upon to have it's intended meaning.  Therefore we must use our own
   relied upon to have it's intended meaning.  Therefore we must use our own
   concoction: _HAVE_STDC.  Always use _HAVE_STDC instead of __STDC__ in newlib
   concoction: _HAVE_STDC.  Always use _HAVE_STDC instead of __STDC__ in newlib
   sources!
   sources!
 
 
   To get a strict ANSI C environment, define macro __STRICT_ANSI__.  This will
   To get a strict ANSI C environment, define macro __STRICT_ANSI__.  This will
   "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
   "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
   files aren't affected).  */
   files aren't affected).  */
 
 
#ifndef _ANSIDECL_H_
#ifndef _ANSIDECL_H_
#define _ANSIDECL_H_
#define _ANSIDECL_H_
 
 
#include <sys/config.h>
#include <sys/config.h>
 
 
/* First try to figure out whether we really are in an ANSI C environment.  */
/* First try to figure out whether we really are in an ANSI C environment.  */
/* FIXME: This probably needs some work.  Perhaps sys/config.h can be
/* FIXME: This probably needs some work.  Perhaps sys/config.h can be
   prevailed upon to give us a clue.  */
   prevailed upon to give us a clue.  */
 
 
#ifdef __STDC__
#ifdef __STDC__
#define _HAVE_STDC
#define _HAVE_STDC
#endif
#endif
 
 
#ifdef _HAVE_STDC
#ifdef _HAVE_STDC
#define _PTR            void *
#define _PTR            void *
#define _AND            ,
#define _AND            ,
#define _NOARGS         void
#define _NOARGS         void
#define _CONST          const
#define _CONST          const
#define _VOLATILE       volatile
#define _VOLATILE       volatile
#define _SIGNED         signed
#define _SIGNED         signed
#define _DOTS           , ...
#define _DOTS           , ...
#define _VOID void
#define _VOID void
#define _EXFUN(name, proto)             name proto
#define _EXFUN(name, proto)             name proto
#define _DEFUN(name, arglist, args)     name(args)
#define _DEFUN(name, arglist, args)     name(args)
#define _DEFUN_VOID(name)               name(_NOARGS)
#define _DEFUN_VOID(name)               name(_NOARGS)
#define _CAST_VOID (void)
#define _CAST_VOID (void)
#ifndef _LONG_DOUBLE
#ifndef _LONG_DOUBLE
#define _LONG_DOUBLE long double
#define _LONG_DOUBLE long double
#endif
#endif
#ifndef _PARAMS
#ifndef _PARAMS
#define _PARAMS(paramlist)              paramlist
#define _PARAMS(paramlist)              paramlist
#endif
#endif
#else   
#else   
#define _PTR            char *
#define _PTR            char *
#define _AND            ;
#define _AND            ;
#define _NOARGS
#define _NOARGS
#define _CONST
#define _CONST
#define _VOLATILE
#define _VOLATILE
#define _SIGNED
#define _SIGNED
#define _DOTS
#define _DOTS
#define _VOID void
#define _VOID void
#define _EXFUN(name, proto)             name()
#define _EXFUN(name, proto)             name()
#define _DEFUN(name, arglist, args)     name arglist args;
#define _DEFUN(name, arglist, args)     name arglist args;
#define _DEFUN_VOID(name)               name()
#define _DEFUN_VOID(name)               name()
#define _CAST_VOID
#define _CAST_VOID
#define _LONG_DOUBLE double
#define _LONG_DOUBLE double
#ifndef _PARAMS
#ifndef _PARAMS
#define _PARAMS(paramlist)              ()
#define _PARAMS(paramlist)              ()
#endif
#endif
#endif
#endif
 
 
/* Support gcc's __attribute__ facility.  */
/* Support gcc's __attribute__ facility.  */
 
 
#ifdef __GNUC__
#ifdef __GNUC__
#define _ATTRIBUTE(attrs) __attribute__ (attrs)
#define _ATTRIBUTE(attrs) __attribute__ (attrs)
#else
#else
#define _ATTRIBUTE(attrs)
#define _ATTRIBUTE(attrs)
#endif
#endif
 
 
#endif /* _ANSIDECL_H_ */
#endif /* _ANSIDECL_H_ */
 
 

powered by: WebSVN 2.1.0

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