Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-08-01 Thread tom fogal
tom fogal writes: > Chia-I Wu 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 > > > #else > > > /* some typedefs */ > > > #endif > > > > I

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-31 Thread Brian Paul
Chia-I Wu wrote: > On Thu, Jul 30, 2009 at 10:37:15AM -0600, Brian Paul wrote: >> Chia-I Wu wrote: >>> On Wed, Jul 29, 2009 at 09:21:15AM -0600, tom fogal wrote: > -#if defined(_MSC_VER) > +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > +# include > +#elif defined(

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-30 Thread Chia-I Wu
On Thu, Jul 30, 2009 at 10:37:15AM -0600, Brian Paul wrote: > Chia-I Wu wrote: > >On Wed, Jul 29, 2009 at 09:21:15AM -0600, tom fogal wrote: > >>>-#if defined(_MSC_VER) > >>>+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > >>>+# include > >>>+#elif defined(_MSC_VER) > >>>typede

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-30 Thread Brian Paul
Chia-I Wu wrote: > On Wed, Jul 29, 2009 at 09:21:15AM -0600, tom fogal wrote: >>> -#if defined(_MSC_VER) >>> +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L >>> +# include >>> +#elif defined(_MSC_VER) >>> typedef __int8 int8_t; >>> typedef unsigned __int8uint

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-29 Thread Chia-I Wu
On Wed, Jul 29, 2009 at 09:21:15AM -0600, tom fogal wrote: > > -#if defined(_MSC_VER) > > +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > > +# include > > +#elif defined(_MSC_VER) > > typedef __int8 int8_t; > > typedef unsigned __int8uint8_t; > > typede

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-29 Thread tom fogal
Chia-I Wu writes: > > On Tue, Jul 28, 2009 at 09:14:04PM -0600, tom fogal wrote: > > Chia-I Wu 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 > > > > # inclu

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-28 Thread Chia-I Wu
On Tue, Jul 28, 2009 at 09:14:04PM -0600, tom fogal wrote: > Chia-I Wu 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 > > > #else > > > /* s

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-28 Thread tom fogal
Chia-I Wu 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 > > #else > > /* some typedefs */ > > #endif > > Or perhaps something more robust / maint

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-28 Thread Chia-I Wu
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 > #else > /* some typedefs */ > #endif > Or perhaps something more robust / maintained by a third party entity > (li

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-28 Thread tom fogal
Chia-I Wu writes: > 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 __int8uint8_t; > > [snip] > > > +#else > > > +# includ

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-27 Thread Chia-I Wu
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 __int8uint8_t; > [snip] > > +#else > > +# include > > +#endif > I think this would mak

Re: [Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-27 Thread tom fogal
Chia-I Wu writes: > /** > + * Get standard integer types > + */ > +#if defined(_MSC_VER) > + typedef __int8 int8_t; > + typedef unsigned __int8uint8_t; [snip] > +#else > +# include > +#endif I think this would make more sense predicated on __STDC_VERSION__ compared to 19990

[Mesa3d-dev] [PATCH 1/2] egl: Silence warnings on x86-64.

2009-07-27 Thread Chia-I Wu
Casting an unsigned int to or from a pointer directly gives warnings on x86-64. Add wrappers to silence the warnings. Signed-off-by: Chia-I Wu --- src/egl/main/eglcompiler.h | 30 ++ src/egl/main/eglconfig.c |2 +- src/egl/main/egldisplay.c | 19 +