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 =
ASFLAGS =
ARFLAGS = rcs
ifeq ($(HOST), x86_64-linux-gnu)
HOST_CFLAGS += -m32
HOST_CXXFLAGS += -m32
HOST_LDFLAGS += -m32
endif
ARM = -marm
THUMB = -mthumb
......
......@@ -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);
TRACE();
......@@ -94,7 +94,7 @@ void serialize_byte(struct serializer *s, unsigned char 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);
TRACE();
......@@ -108,7 +108,7 @@ void serialize_halfword(struct serializer *s, unsigned short h)
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);
TRACE();
......
......@@ -11,6 +11,7 @@ extern "C" {
#endif
#include <stdlib.h>
#include <stdint.h>
struct reloc {
unsigned pos;
......@@ -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_fixup_pointers(struct serializer *s);
void serialize_byte(struct serializer *s, unsigned char b);
void serialize_halfword(struct serializer *s, unsigned short h);
void serialize_word(struct serializer *s, unsigned int w);
void serialize_byte(struct serializer *s, uint8_t b);
void serialize_halfword(struct serializer *s, uint16_t h);
void serialize_word(struct serializer *s, uint32_t w);
void serialize_string(struct serializer *s, const char *str, const size_t len);
void serialize_pointer(struct serializer *s, void *ptr);
......
......@@ -4,9 +4,8 @@
CC = g++
CPPFLAGS = -I.. -DUNIT_TESTING -DDEBUG
CFLAGS = -g -m32
CXXFLAGS = -g -m32
# TARGET_ARCH = -m32
CFLAGS = -g
CXXFLAGS = -g
ifdef COMSPEC
EXE_EXT=.exe
......
Markdown is supported
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