summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-13 06:01:21 +0000
committermidipix <writeonce@midipix.org>2016-12-13 11:17:08 -0500
commit5d9c488253f379e4f71076730e628375dbe3558e (patch)
tree68a5e7804402a985d0ac1de33b31e0af2e6db840 /src
parent670ee5215a9f3749b7f986c56c1c6c4f12c31ec7 (diff)
downloadpemagine-5d9c488253f379e4f71076730e628375dbe3558e.tar.bz2
pemagine-5d9c488253f379e4f71076730e628375dbe3558e.tar.xz
pe_impl_strlen_{ansi|utf16}(): provide smooth foreign toolchain support.
Diffstat (limited to 'src')
-rw-r--r--src/headers/pe_get_image_section_tbl_addr.c2
-rw-r--r--src/internal/pe_impl.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/headers/pe_get_image_section_tbl_addr.c b/src/headers/pe_get_image_section_tbl_addr.c
index 98420de..f5a7054 100644
--- a/src/headers/pe_get_image_section_tbl_addr.c
+++ b/src/headers/pe_get_image_section_tbl_addr.c
@@ -37,7 +37,7 @@ struct pe_raw_sec_hdr * pe_get_image_named_section_addr(const void * base, const
struct pe_raw_sec_hdr * hdr;
struct pe_raw_coff_file_hdr * coff;
char * ch;
- uint32_t len;
+ size_t len;
uint32_t pos;
uint64_t sname;
diff --git a/src/internal/pe_impl.h b/src/internal/pe_impl.h
index c854824..a316bf3 100644
--- a/src/internal/pe_impl.h
+++ b/src/internal/pe_impl.h
@@ -19,7 +19,7 @@ struct pe_block {
};
-static __inline__ int32_t pe_impl_strlen_ansi(const char * str)
+static __inline__ intptr_t pe_impl_strlen_ansi(const char * str)
{
const char * ch;
const char * upper_bound;
@@ -35,7 +35,7 @@ static __inline__ int32_t pe_impl_strlen_ansi(const char * str)
}
-static __inline__ int32_t pe_impl_strlen_utf16(const wchar16_t * str)
+static __inline__ intptr_t pe_impl_strlen_utf16(const wchar16_t * str)
{
const wchar16_t * wch;
const wchar16_t * upper_bound;