[Piglit] [PATCH] util: Remove custom defs of C99 types for MSVC (v2)
Jose Fonseca
jfonseca at vmware.com
Wed Jun 13 00:38:16 PDT 2012
Looks good.
Jose
----- Original Message -----
> piglit-util.h contained an #ifdef that defined C99 types for MSVC.
> Remove
> the C99 definitions there and let MSVC simply include the C99 headers
> located at $PIGLIT_TOP/include/msvc/c99.
>
> v2: Don't delete `#define log2`, per Ken.
>
> CC: Kennth Graunke <kenneth at whitecape.org>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
> tests/util/piglit-util.h | 18 ++----------------
> 1 file changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
> index 2d89775..6ea423d 100755
> --- a/tests/util/piglit-util.h
> +++ b/tests/util/piglit-util.h
> @@ -36,26 +36,12 @@ extern "C" {
> #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>
> --
> 1.7.10.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
More information about the Piglit
mailing list