mesa: use the PRIx64 macro for printing 64-bit hexadecimal values
authorBrian Paul <brianp@vmware.com>
Mon, 2 Jul 2012 23:23:03 +0000 (17:23 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 5 Jul 2012 14:07:25 +0000 (08:07 -0600)
We'll revert the #define fprintf __mingw_fprintf change next.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/program/prog_print.c

index 46f1df0fcd7f052fb30b4800485b8652789f00dd..bc5dc5803672660ec0b1f79f026f904686db6013 100644 (file)
@@ -29,6 +29,8 @@
  * \author Brian Paul
  */
 
+#include <inttypes.h>  /* for PRIx64 macro */
+
 #include "main/glheader.h"
 #include "main/context.h"
 #include "main/imports.h"
@@ -970,11 +972,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);