filename | test/include/_ansi.h |
changeset | 185:6755a04c447f |
author | nkeynes |
date | Thu Feb 23 15:24:47 2012 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Check for existence of glDrawBuffer (assuming that glReadBuffer will follow). Note only need to guard the common code in gl_fbo.c |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/test/include/_ansi.h Thu Feb 23 15:24:47 2012 +10001.3 @@ -0,0 +1,71 @@1.4 +/* Provide support for both ANSI and non-ANSI environments. */1.5 +1.6 +/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be1.7 + relied upon to have it's intended meaning. Therefore we must use our own1.8 + concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib1.9 + sources!1.10 +1.11 + To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will1.12 + "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header1.13 + files aren't affected). */1.14 +1.15 +#ifndef _ANSIDECL_H_1.16 +#define _ANSIDECL_H_1.17 +1.18 +#include <sys/config.h>1.19 +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 be1.22 + prevailed upon to give us a clue. */1.23 +1.24 +#ifdef __STDC__1.25 +#define _HAVE_STDC1.26 +#endif1.27 +1.28 +#ifdef _HAVE_STDC1.29 +#define _PTR void *1.30 +#define _AND ,1.31 +#define _NOARGS void1.32 +#define _CONST const1.33 +#define _VOLATILE volatile1.34 +#define _SIGNED signed1.35 +#define _DOTS , ...1.36 +#define _VOID void1.37 +#define _EXFUN(name, proto) name proto1.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_DOUBLE1.42 +#define _LONG_DOUBLE long double1.43 +#endif1.44 +#ifndef _PARAMS1.45 +#define _PARAMS(paramlist) paramlist1.46 +#endif1.47 +#else1.48 +#define _PTR char *1.49 +#define _AND ;1.50 +#define _NOARGS1.51 +#define _CONST1.52 +#define _VOLATILE1.53 +#define _SIGNED1.54 +#define _DOTS1.55 +#define _VOID void1.56 +#define _EXFUN(name, proto) name()1.57 +#define _DEFUN(name, arglist, args) name arglist args;1.58 +#define _DEFUN_VOID(name) name()1.59 +#define _CAST_VOID1.60 +#define _LONG_DOUBLE double1.61 +#ifndef _PARAMS1.62 +#define _PARAMS(paramlist) ()1.63 +#endif1.64 +#endif1.65 +1.66 +/* Support gcc's __attribute__ facility. */1.67 +1.68 +#ifdef __GNUC__1.69 +#define _ATTRIBUTE(attrs) __attribute__ (attrs)1.70 +#else1.71 +#define _ATTRIBUTE(attrs)1.72 +#endif1.73 +1.74 +#endif /* _ANSIDECL_H_ */
.