1 /* Provide support for both ANSI and non-ANSI environments. */
3 /* Some ANSI environments are "broken" in the sense that __STDC__ cannot be
4 relied upon to have it's intended meaning. Therefore we must use our own
5 concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib
8 To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will
9 "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
10 files aren't affected). */
15 /* First try to figure out whether we really are in an ANSI C environment. */
16 /* FIXME: This probably needs some work. Perhaps sys/config.h can be
17 prevailed upon to give us a clue. */
28 #define _VOLATILE volatile
29 #define _SIGNED signed
33 #define _EXFUN(name, proto) __cdecl name proto
34 #define _EXPARM(name, proto) (* __cdecl name) proto
36 #define _EXFUN(name, proto) name proto
37 #define _EXPARM(name, proto) (* name) proto
39 #define _DEFUN(name, arglist, args) name(args)
40 #define _DEFUN_VOID(name) name(_NOARGS)
41 #define _CAST_VOID (void)
43 #define _LONG_DOUBLE long double
46 #define _PARAMS(paramlist) paramlist
57 #define _EXFUN(name, proto) name()
58 #define _DEFUN(name, arglist, args) name arglist args;
59 #define _DEFUN_VOID(name) name()
61 #define _LONG_DOUBLE double
63 #define _PARAMS(paramlist) ()
67 /* Support gcc's __attribute__ facility. */
70 #define _ATTRIBUTE(attrs) __attribute__ (attrs)
72 #define _ATTRIBUTE(attrs)
75 #define ATTRIBUTE_PRINTF(fmt, arg1) _ATTRIBUTE( ( format( printf, fmt, arg1 ) ) )
76 #define ATTRIBUTE_SCANF(fmt, arg1) _ATTRIBUTE( ( format( scanf, fmt, arg1 ) ) )
78 #endif /* _ANSIDECL_H_ */