Commit 24b3966a authored by Erik Faye-Lund's avatar Erik Faye-Lund
Browse files

pimpconv: use sized integers

This should fix the 64-issue on non-Windows platforms.
parent 3795e579
...@@ -82,12 +82,6 @@ LDFLAGS = ...@@ -82,12 +82,6 @@ LDFLAGS =
ASFLAGS = ASFLAGS =
ARFLAGS = rcs ARFLAGS = rcs
ifeq ($(HOST), x86_64-linux-gnu)
HOST_CFLAGS += -m32
HOST_CXXFLAGS += -m32
HOST_LDFLAGS += -m32
endif
ARM = -marm ARM = -marm
THUMB = -mthumb THUMB = -mthumb
......
...@@ -82,7 +82,7 @@ void serializer_align(struct serializer *s, int alignment) ...@@ -82,7 +82,7 @@ void serializer_align(struct serializer *s, int alignment)
} }
} }
void serialize_byte(struct serializer *s, unsigned char b) void serialize_byte(struct serializer *s, uint8_t b)
{ {
ASSERT(NULL != s); ASSERT(NULL != s);
TRACE(); TRACE();
...@@ -94,7 +94,7 @@ void serialize_byte(struct serializer *s, unsigned char b) ...@@ -94,7 +94,7 @@ void serialize_byte(struct serializer *s, unsigned char b)
s->data[s->pos++] = b; s->data[s->pos++] = b;
} }
void serialize_halfword(struct serializer *s, unsigned short h) void serialize_halfword(struct serializer *s, uint16_t h)
{ {
ASSERT(NULL != s); ASSERT(NULL != s);
TRACE(); TRACE();
...@@ -108,7 +108,7 @@ void serialize_halfword(struct serializer *s, unsigned short h) ...@@ -108,7 +108,7 @@ void serialize_halfword(struct serializer *s, unsigned short h)
s->data[s->pos++] = (unsigned char)(h >> 8); s->data[s->pos++] = (unsigned char)(h >> 8);
} }
void serialize_word(struct serializer *s, unsigned int w) void serialize_word(struct serializer *s, uint32_t w)
{ {
ASSERT(NULL != s); ASSERT(NULL != s);
TRACE(); TRACE();
......
...@@ -11,6 +11,7 @@ extern "C" { ...@@ -11,6 +11,7 @@ extern "C" {
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
struct reloc { struct reloc {
unsigned pos; unsigned pos;
...@@ -34,9 +35,9 @@ void serializer_align(struct serializer *s, int alignment); ...@@ -34,9 +35,9 @@ void serializer_align(struct serializer *s, int alignment);
void serializer_set_pointer(struct serializer *s, void *ptr, int pos); void serializer_set_pointer(struct serializer *s, void *ptr, int pos);
void serializer_fixup_pointers(struct serializer *s); void serializer_fixup_pointers(struct serializer *s);
void serialize_byte(struct serializer *s, unsigned char b); void serialize_byte(struct serializer *s, uint8_t b);
void serialize_halfword(struct serializer *s, unsigned short h); void serialize_halfword(struct serializer *s, uint16_t h);
void serialize_word(struct serializer *s, unsigned int w); void serialize_word(struct serializer *s, uint32_t w);
void serialize_string(struct serializer *s, const char *str, const size_t len); void serialize_string(struct serializer *s, const char *str, const size_t len);
void serialize_pointer(struct serializer *s, void *ptr); void serialize_pointer(struct serializer *s, void *ptr);
......
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
CC = g++ CC = g++
CPPFLAGS = -I.. -DUNIT_TESTING -DDEBUG CPPFLAGS = -I.. -DUNIT_TESTING -DDEBUG
CFLAGS = -g -m32 CFLAGS = -g
CXXFLAGS = -g -m32 CXXFLAGS = -g
# TARGET_ARCH = -m32
ifdef COMSPEC ifdef COMSPEC
EXE_EXT=.exe EXE_EXT=.exe
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment