On 06/12/2012 05:21 PM, Kenneth Graunke wrote: > On 06/12/2012 04:02 PM, Chad Versace wrote: >> piglit-util.h contained an #ifdef that defined C99 types for MSVC. Remove >> that #ifdef block and let MSVC simply include the C99 headers located at >> $PIGLIT_TOP/include/msvc/c99. >> >> Signed-off-by: Chad Versace <chad.vers...@linux.intel.com> >> --- >> tests/util/piglit-util.h | 22 ++-------------------- >> 1 file changed, 2 insertions(+), 20 deletions(-) >> >> diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h >> index 2d89775..c1f848d 100755 >> --- a/tests/util/piglit-util.h >> +++ b/tests/util/piglit-util.h >> @@ -35,27 +35,9 @@ extern "C" { >> #include <windows.h> >> #endif >> >> -#if defined(_MSC_VER) >> -typedef signed char int8_t; >> -typedef __int16 int16_t; >> -typedef __int32 int32_t; >> -typedef __int64 int64_t; >> -typedef unsigned __int8 uint8_t; >> -typedef unsigned __int16 uint16_t; >> -typedef unsigned __int32 uint32_t; >> -typedef unsigned __int64 uint64_t; >> -#ifndef __cplusplus >> -#define bool BOOL >> -#define true 1 >> -#define false 0 >> -#endif >> -#define log2(x) (log(x) / log(2)) >> -#else >> -#include <stdint.h> >> -#include <stdbool.h> >> -#endif >> - >> #include <assert.h> >> +#include <stdbool.h> >> +#include <stdint.h> >> #include <string.h> >> #include <stdio.h> >> #include <stdlib.h> > > I like your approach, but I think the missing log2 implementation is > going to break something. We may just want to include a file that > offers the usual dumb-wrapper implementations on MSVC so we can use them > like normal.
Oops. Deleting log2 was a mistake. I'll put that back in v2, and we can add a dumb-wrapper header for that later. _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit