Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

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.



Daniel Schepler reported problems with makeobj on amd64 (see, 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.



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.