1 diff -dur -x '*.orig' -x '*.rej' -x '*~' openttd-1.4.0.orig/config.lib openttd-1.4.0/config.lib
2 --- openttd-1.4.0.orig/config.lib 2014-04-01 20:37:07.000000000 +0200
3 +++ openttd-1.4.0/config.lib 2014-04-08 19:28:02.013554008 +0200
21 --without-cocoa) with_cocoa="0";;
22 --with-cocoa=*) with_cocoa="$optarg";;
24 + --with-home-etc) with_home_etc="1";;
25 + --without-home-etc) with_home_etc="0";;
27 --with-zlib) with_zlib="2";;
28 --without-zlib) with_zlib="0";;
29 --with-zlib=*) with_zlib="$optarg";;
30 @@ -1651,6 +1656,11 @@
34 + if [ "$with_home_etc" != 0 ]; then
35 + CFLAGS="$CFLAGS -DWITH_HOME_ETC"
36 + LIBS="$LIBS -lhome_etc"
39 if [ "$with_zlib" != "0" ]; then
40 if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
42 diff -dur -x '*.orig' -x '*.rej' -x '*~' openttd-1.4.0.orig/src/fileio.cpp openttd-1.4.0/src/fileio.cpp
43 --- openttd-1.4.0.orig/src/fileio.cpp 2014-04-01 20:37:03.000000000 +0200
44 +++ openttd-1.4.0/src/fileio.cpp 2014-04-08 19:30:30.296888687 +0200
50 +#include <home_etc.h>
53 /** Size of the #Fio data buffer. */
54 #define FIO_BUFFER_SIZE 512
56 @@ -1103,7 +1107,11 @@
57 * or at least before something else touches the environment
58 * variables in any way. It can also contain all kinds of
59 * unvalidated data we rather not want internally. */
61 + const char *homedir = _HEdir;
63 const char *homedir = getenv("HOME");
65 if (homedir != NULL) {
66 homedir = strndup(homedir, MAX_PATH);