[Mesa-dev] [PATCH 1/2] mesa: use the PRIx64 macro for printing 64-bit hexadecimal values

Jose Fonseca jfonseca at vmware.com
Tue Jul 3 10:05:06 PDT 2012


Sounds a good idea.

These are defined in include/c99/inttypes.h for MSVC, so it should work there too.

But I wonder if 

  #include <inttypes.h>

shouldn't be added though.

Jose

----- Original Message -----
> We'll revert the #define fprintf __mingw_fprintf change next.
> ---
>  src/mesa/program/prog_print.c |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/src/mesa/program/prog_print.c
> b/src/mesa/program/prog_print.c
> index 46f1df0..db69884 100644
> --- a/src/mesa/program/prog_print.c
> +++ b/src/mesa/program/prog_print.c
> @@ -970,11 +970,10 @@ _mesa_fprint_program_parameters(FILE *f,
>  {
>     GLuint i;
>  
> -   fprintf(f, "InputsRead: 0x%llx (0b%s)\n",
> -           (unsigned long long) prog->InputsRead,
> binary(prog->InputsRead));
> -   fprintf(f, "OutputsWritten: 0x%llx (0b%s)\n",
> -                 (unsigned long long)prog->OutputsWritten,
> -		 binary(prog->OutputsWritten));
> +   fprintf(f, "InputsRead: %" PRIx64 " (0b%s)\n",
> +           (uint64_t) prog->InputsRead, binary(prog->InputsRead));
> +   fprintf(f, "OutputsWritten: %" PRIx64 " (0b%s)\n",
> +           (uint64_t) prog->OutputsWritten,
> binary(prog->OutputsWritten));
>     fprintf(f, "NumInstructions=%d\n", prog->NumInstructions);
>     fprintf(f, "NumTemporaries=%d\n", prog->NumTemporaries);
>     fprintf(f, "NumParameters=%d\n", prog->NumParameters);
> --
> 1.7.3.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list