On Mon, 27 Sep 2004 09:58:17 -0700
Ian Romanick <idr@...> wrote:
> Ronny V. Vindenes wrote:
>=20
> > Which C standard is Mesa/DRI supposed to follow? Some of the old linux
> > targets say ansi others C99.
>=20
> My personal opinion is that additions in the C99 spec are useful enough=20
> and common enough to rely on. At the very least, DRI code (i.e., the=20
> stuff in src/mesa/drivers/dri) can rely on C99. For all practical=20
> purposes, it only builds on systems with fairly recent GCC, so this is=20
> safe. The rest of the code may need to only rely on C89. I'll defer to=
=20
> Brian's opinion on that.
OML_sync_control declarations in glxext.h depend on __STDC_VERSION__ >=3D
199901L. dri_util.c is affected by this. There is a bogus check in there
to workaround an old STDC_VERSION:
#ifndef PFNGLXGETMSCRATEOMLPROC
typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __=
DRIid drawable, int32_t *numerator, int32_t *denominator);
#endif
The "#ifndef" test is wrong because PFNGLXGETMSCRATEOMLPROC is not a
preprocessor definition but a typedef. I've seen this cause trouble when
I messed with compiler options in the DRI xc tree. Not sure why it works
in current Mesa builds.
>=20
[snip]
| Felix K=FChling <fxkuehl@...> http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 |
|