The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Spike on February 02, 2012, 02:01:16 PM

Title: help_frame_t should not depend on system specific functions
Post by: Spike on February 02, 2012, 02:01:16 PM
help_frame.cc has


// for chdir
#ifdef _WIN32
#include <direct.h>
#else
#include <unistd.h>
#endif


if chdir is needed, but system dependent, it should go into a lower level file, actually one of the "simsys??.cc" (or simsys.cc) files where the system abtraction code resides.
Title: Re: help_frame_t should not depend on system specific functions
Post by: Dwachs on February 05, 2012, 09:58:56 AM
Here is a patch that #includes the relevant headers directly in simsys.h

As I cannot compile for windows (using mingw / MSVS), can somebody please test if it compiles on these systems?

Edit: updated to compile with MSVS.
Title: Re: help_frame_t should not depend on system specific functions
Post by: isidoro on February 05, 2012, 01:34:00 PM
Are you a Linux only person?  I'm not alone, then.

Title: Re: help_frame_t should not depend on system specific functions
Post by: Dwachs on February 05, 2012, 01:36:05 PM
no, my wife works with the windows laptop, so I am bound to a linux pc :D

anyway, this is now incorporated thanks to Tron.
Title: Re: help_frame_t should not depend on system specific functions
Post by: Spike on February 05, 2012, 09:59:42 PM
Thank you!
Title: Re: help_frame_t should not depend on system specific functions
Post by: isidoro on February 05, 2012, 11:03:48 PM
Quote from: Dwachs on February 05, 2012, 01:36:05 PM
no, my wife works with the windows laptop, so I am bound to a linux pc :D
[...]

I understand... ;)
Too good to be true...