Chia-I Wu <olva...@gmail.com> writes: > > On Tue, Jul 28, 2009 at 09:14:04PM -0600, tom fogal wrote: > > Chia-I Wu <olva...@gmail.com> writes: > > > On Tue, Jul 28, 2009 at 11:10:43AM -0600, tom fogal wrote: > > > > Hrm. I would argue that both places should read something more like: > > > > #if C99 is supported > > > > # include <stdint.h> > > > > #else > > > > /* some typedefs */ > > > > #endif > > > > Or perhaps something more robust / maintained by a third party > > > > entity (like the `msinttypes' project you mention; boost has a > > > > similar header which probably isn't C++-specific; I'm sure there's > > > > others out there) could be integrated. > > > > Anyway, presumably the above #if sequence would "just work" when > > > > (if?) MS finally decides to support enough C99 to update that > > > > define. > > > I prefer your c99/non-c99 method, both in eglcompiler.h and mesa's > > > main compiler.h. But my concern is that I only have gcc to test. > > > Only if I have more platforms (i.e. visual studio) to test, or > > > someone would like to help, I am not comfortable enough to send a > > > patch that changes compiler.h. > > > I'll be honest, even after half-paying-attention here for awhile, I'd > > have to google EGL to know what it is, let alone how to enable it. I'd > > volunteer to test compiler.h on vs2008 though, and presumably the code > > would be the same in both places so that'd be enough. > > hmm, I couldn't come up with a sane way to handle the #else part. > The best I can do is to prefer stdint.h on c99 compiler, as can be > seen in the attachment. The only thing needs to be tested becomes > does VS guarantee the existence of stdint.h when it claims c99?
I can't imagine a compiler vendor would report c99 support but not actually support it. > -#if defined(_MSC_VER) > +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > +# include <stdint.h> > +#elif defined(_MSC_VER) > typedef __int8 int8_t; > typedef unsigned __int8 uint8_t; > typedef __int16 int16_t; Why not just "#else"? Anyway, I'll give it a try sometime today. Thanks, -tom ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev