AcessNative - Changes to allow _compiling_ on windows.
[tpg/acess2.git] / AcessNative / ld-acess_src / elf_load.c
index 8cafc01..d661622 100644 (file)
@@ -3,11 +3,12 @@
  *\r
  * ELF Executable Loader Code\r
  */\r
-#define DEBUG  1\r
+#define DEBUG  0\r
 #include <stdlib.h>\r
 #include <stdio.h>\r
 #include <string.h>\r
 #include <unistd.h>\r
+#include <inttypes.h>  // PRIx64\r
 #include "common.h"\r
 #include "elf32.h"\r
 #include "elf64.h"\r
@@ -288,8 +289,8 @@ void *Elf64Load(int FD, Elf64_Ehdr *hdr)
                addr = phtab[i].p_vaddr + baseDiff;\r
 \r
                if( AllocateMemory( addr, phtab[i].p_memsz ) ) {\r
-                       fprintf(stderr, "Elf_Load: Unable to map memory at %llx (0x%llx bytes)\n",\r
-                               (long long)addr, (long long)phtab[i].p_memsz);\r
+                       fprintf(stderr, "Elf_Load: Unable to map memory at %"PRIx64" (0x%"PRIx64" bytes)\n",\r
+                               (uint64_t)addr, (uint64_t)phtab[i].p_memsz);\r
                        free( phtab );\r
                        return NULL;\r
                }\r

UCC git Repository :: git.ucc.asn.au