News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

PATCH: makeobj portability issues

Started by ansgar, August 18, 2008, 09:51:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ansgar

Hi,

Daniel Schepler reported problems with makeobj on amd64 (see http://bugs.debian.org/493409), Peter Green and Peter De Wachter contributed patches to solve them.  Please consider applying the patches below:

01_png.patch by Peter Green
png_uint_32 is 64 bit on some architectures, make sure referenced variables have the correct size

02_makeobj_fixes.patch by Peter De Wachter:
Add proper serialization code instead of dumping in-memory objects

03_makeobj_cleanup.patch by Peter De Wachter:
After the last patch the weird logic in obj_node_t isn't needed anymore, so it can be removed. (This is strictly cleanup, it isn't necessary for makeobj to run correctly.)

Peter De Wachter reported that he got identical results on i386, amd64 and mips after applying the patches, I can also confirm that i386 and powerpc give identical files (tested with pak64).  Please note that I have only tested the patches against the released 100.0, not current SVN, but the patches still apply cleanly.

Peter De Wachter also contributed a patch to detect endianness automatically based on the <endian.h> header.  I don't know if Windows and OS X support this header, but if they do you might also consider applying 00_big_endian.patch.

Regards,
Ansgar

prissi

endian.h is not available under visual C++ and also not under BeOS 5.0, thus this is apparently something not possible. The other patches will be included.

Thank you.