From: David Given Date: Thu, 27 Sep 2012 10:32:40 +0000 (+0100) Subject: Change from using platform-specific types to stdint platform-independent types X-Git-Tag: release-6-0-pre-5~34 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=4349d702fafea106af46ac6ee16bf1ff1664ffa2;p=ack.git Change from using platform-specific types to stdint platform-independent types when reading the structure header. --- diff --git a/util/amisc/aelflod.c b/util/amisc/aelflod.c index 0e04b2421..edd1e82c8 100644 --- a/util/amisc/aelflod.c +++ b/util/amisc/aelflod.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "out.h" @@ -221,7 +222,7 @@ void iconvert(char* buf, char* str, char* fmt) { register char *nf, *ni, *no ; int last, i ; - long value ; + uint32_t value ; ni=buf ; no=str ; nf=fmt ; while ( last = *nf++ ) { last -= '0' ; @@ -234,8 +235,8 @@ void iconvert(char* buf, char* str, char* fmt) switch ( last ) { case 0 : break ; case 1 : *no= value ; break ; - case 2 : *(unsigned short *)no = value ; break ; - case 4 : *(long *)no = value ; break ; + case 2 : *(uint16_t *)no = value ; break ; + case 4 : *(uint32_t *)no = value ; break ; default : fatal("illegal out.h format string\n"); }