From e387c6bc56b9e3de2b517a37fe2e943d57fc879c Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Sat, 18 Jan 2003 22:48:21 +0000 Subject: [PATCH] Portability updates. committer: mfx 1042930101 +0000 --- src/p_lx_elf.cpp | 2 +- src/p_lx_exc.cpp | 4 ++-- src/p_lx_exc.h | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index a9a6ee72..2e91e61a 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -257,7 +257,7 @@ void PackLinuxI386elf::pack1(OutputFile *fo, Filter &) assert(ehdri.e_phoff == sizeof(Elf_LE32_Ehdr)); // checked by canPack() sz_phdrs = ehdri.e_phnum * ehdri.e_phentsize; - phdri = new Elf_LE32_Phdr[ehdri.e_phnum]; + phdri = new Elf_LE32_Phdr[(unsigned)ehdri.e_phnum]; fi->seek(ehdri.e_phoff, SEEK_SET); fi->readx(phdri, sz_phdrs); diff --git a/src/p_lx_exc.cpp b/src/p_lx_exc.cpp index a69423f0..02faa395 100644 --- a/src/p_lx_exc.cpp +++ b/src/p_lx_exc.cpp @@ -81,8 +81,8 @@ const int *PackLinuxI386::getFilters() const void PackLinuxI386::generateElfHdr( - OutputFile *const fo, - void const *const proto, + OutputFile *fo, + void const *proto, unsigned const brka ) { diff --git a/src/p_lx_exc.h b/src/p_lx_exc.h index cade991d..714bfc92 100644 --- a/src/p_lx_exc.h +++ b/src/p_lx_exc.h @@ -42,7 +42,7 @@ public: virtual void generateElfHdr( OutputFile *, void const *proto, - unsigned brka + unsigned const brka ); virtual int getFormat() const { return UPX_F_LINUX_i386; } virtual const char *getName() const { return "linux/386"; } @@ -86,25 +86,25 @@ protected: struct cprElfHdr1 { struct Elf_LE32_Ehdr ehdr; struct Elf_LE32_Phdr phdr[1]; - struct PackUnix::l_info linfo; + struct l_info linfo; } __attribute_packed; struct cprElfHdr2 { struct Elf_LE32_Ehdr ehdr; struct Elf_LE32_Phdr phdr[2]; - struct PackUnix::l_info linfo; + struct l_info linfo; } __attribute_packed; struct cprElfHdr3 { struct Elf_LE32_Ehdr ehdr; struct Elf_LE32_Phdr phdr[3]; - struct PackUnix::l_info linfo; + struct l_info linfo; } __attribute_packed; - cprElfHdr3 elfout; + struct cprElfHdr3 elfout; };