diff options
author | marcel <marcel@FreeBSD.org> | 1999-12-18 12:12:12 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 1999-12-18 12:12:12 +0000 |
commit | 0895fb994cdd04d536dc24ce8f27681af51a8422 (patch) | |
tree | c6be905cf31f141413e3f95c61677e04d0a27e83 /usr.sbin/elf2exe | |
parent | 76277b31cd7a7923edca01cc915e5afd619a55bb (diff) | |
download | FreeBSD-src-0895fb994cdd04d536dc24ce8f27681af51a8422.zip FreeBSD-src-0895fb994cdd04d536dc24ce8f27681af51a8422.tar.gz |
Use long long format specifiers and cast each parameter to long long.
This avoids the ugly #if ARCH/#else/#endif construct.
Prompted to by: bde
Could have thought of this himself: marcel
Diffstat (limited to 'usr.sbin/elf2exe')
-rw-r--r-- | usr.sbin/elf2exe/elf2exe.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/usr.sbin/elf2exe/elf2exe.c b/usr.sbin/elf2exe/elf2exe.c index 3689af8..41c7e87 100644 --- a/usr.sbin/elf2exe/elf2exe.c +++ b/usr.sbin/elf2exe/elf2exe.c @@ -299,16 +299,12 @@ main(int argc, char** argv) for (i = 1; i < sections; i++) { printf("section %d (%s): " -#if defined(__alpha__) - "type=%x flags=0%lx " - "offs=%lx size=%lx addr=%lx\n", -#else "type=%x flags=0%llx " "offs=%llx size=%llx addr=%llx\n", -#endif i, shstrtab + shdr[i].sh_name, - shdr[i].sh_type, shdr[i].sh_flags, - shdr[i].sh_offset, shdr[i].sh_size, shdr[i].sh_addr); + shdr[i].sh_type, (long long)shdr[i].sh_flags, + (long long)shdr[i].sh_offset, (long long)shdr[i].sh_size, + (long long)shdr[i].sh_addr); } textstart = section_start(shdr, sections, ".text"); @@ -327,15 +323,11 @@ main(int argc, char** argv) bssstart = section_start(shdr, sections, ".bss"); bsssize = section_size(shdr, sections, ".bss"); -#if defined(__alpha__) - printf ("text: %lx(%lx) @%lx data: %lx(%lx) @%lx bss: %lx(%lx)\n", -#else printf("text: %llx(%llx) @%llx data: %llx(%llx) @%llx " "bss: %llx(%llx)\n", -#endif - textstart, textsize, textfpos, - datastart, datasize, datafpos, - bssstart, bsssize); + (long long)textstart, (long long)textsize, (long long)textfpos, + (long long)datastart, (long long)datasize, (long long)datafpos, + (long long)bssstart, (long long)bsssize); memset(&filehdr, 0, sizeof filehdr); memset(&aouthdr, 0, sizeof aouthdr); |