On Mon, Jul 27, 2009 at 10:07:37AM -0600, tom fogal wrote:
> >  /**
> > + * Get standard integer types
> > + */
> > +#if defined(_MSC_VER)
> > +   typedef __int8             int8_t;
> > +   typedef unsigned __int8    uint8_t;
> [snip]
> > +#else
> > +#  include <stdint.h>
> > +#endif
> I think this would make more sense predicated on __STDC_VERSION__
> compared to 199901L (i.e. c99 path and non-c99 path).
This is the part of C that I never know how to do right, and therefore I
stole it from mesa/main/compiler.h.

I read it as

#if defined(_MSC_VER)
/* some typedefs */
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
#include <stdint.h>
#else
/* no better way, hope the best */
#include <stdint.h>
#endif

with visual studio being a special case[1] and with the middle #elif
optimized out.

[1] VS seems to miss the headers, http://code.google.com/p/msinttypes/

-- 
Regards,
olv

------------------------------------------------------------------------------
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

Reply via email to