1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/include/_ansi.h Thu Aug 23 12:34:43 2007 +0000
1.4 +/* Provide support for both ANSI and non-ANSI environments. */
1.6 +/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be
1.7 + relied upon to have it's intended meaning. Therefore we must use our own
1.8 + concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib
1.11 + To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will
1.12 + "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
1.13 + files aren't affected). */
1.15 +#ifndef _ANSIDECL_H_
1.16 +#define _ANSIDECL_H_
1.18 +#include <sys/config.h>
1.20 +/* First try to figure out whether we really are in an ANSI C environment. */
1.21 +/* FIXME: This probably needs some work. Perhaps sys/config.h can be
1.22 + prevailed upon to give us a clue. */
1.29 +#define _PTR void *
1.31 +#define _NOARGS void
1.32 +#define _CONST const
1.33 +#define _VOLATILE volatile
1.34 +#define _SIGNED signed
1.35 +#define _DOTS , ...
1.37 +#define _EXFUN(name, proto) name proto
1.38 +#define _DEFUN(name, arglist, args) name(args)
1.39 +#define _DEFUN_VOID(name) name(_NOARGS)
1.40 +#define _CAST_VOID (void)
1.41 +#ifndef _LONG_DOUBLE
1.42 +#define _LONG_DOUBLE long double
1.45 +#define _PARAMS(paramlist) paramlist
1.48 +#define _PTR char *
1.56 +#define _EXFUN(name, proto) name()
1.57 +#define _DEFUN(name, arglist, args) name arglist args;
1.58 +#define _DEFUN_VOID(name) name()
1.60 +#define _LONG_DOUBLE double
1.62 +#define _PARAMS(paramlist) ()
1.66 +/* Support gcc's __attribute__ facility. */
1.69 +#define _ATTRIBUTE(attrs) __attribute__ (attrs)
1.71 +#define _ATTRIBUTE(attrs)
1.74 +#endif /* _ANSIDECL_H_ */