The International Simutrans Forum

 

Author Topic: PATCH: makeobj portability issues  (Read 3459 times)

0 Members and 1 Guest are viewing this topic.

Offline ansgar

  • *
  • Posts: 80
PATCH: makeobj portability issues
« on: August 18, 2008, 09:51:41 PM »
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

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10820
  • Languages: De,EN,JP
Re: PATCH: makeobj portability issues
« Reply #1 on: August 19, 2008, 09:41:39 AM »
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.