summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/endian_type.hpp2
-rw-r--r--src/dedicated.cpp3
-rw-r--r--src/network/core/os_abstraction.h6
-rw-r--r--src/stdafx.h14
4 files changed, 13 insertions, 12 deletions
diff --git a/src/core/endian_type.hpp b/src/core/endian_type.hpp
index 4058c5c19..1cacf6c0c 100644
--- a/src/core/endian_type.hpp
+++ b/src/core/endian_type.hpp
@@ -26,7 +26,7 @@
#define TTD_BIG_ENDIAN 1
/* Windows has always LITTLE_ENDIAN */
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(_WIN32) || defined(__OS2__) || defined(__HAIKU__)
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
#elif defined(OSX)
# include <sys/types.h>
diff --git a/src/dedicated.cpp b/src/dedicated.cpp
index e80abab16..574cbb0c3 100644
--- a/src/dedicated.cpp
+++ b/src/dedicated.cpp
@@ -22,10 +22,9 @@ FILE *_log_fd = NULL; ///< File to reroute output of a forked OpenTTD to
#include "safeguards.h"
-#if (defined(SUNOS) && !defined(_LP64) && !defined(_I32LPx)) || defined(__HAIKU__)
+#if defined(SUNOS) && !defined(_LP64) && !defined(_I32LPx)
/* Solaris has, in certain situation, pid_t defined as long, while in other
* cases it has it defined as int... this handles all cases nicely.
- * Haiku has also defined pid_t as a long.
*/
# define PRINTF_PID_T "%ld"
#else
diff --git a/src/network/core/os_abstraction.h b/src/network/core/os_abstraction.h
index 084f763c2..16c85d566 100644
--- a/src/network/core/os_abstraction.h
+++ b/src/network/core/os_abstraction.h
@@ -63,7 +63,7 @@ typedef unsigned long in_addr_t;
# include <arpa/inet.h>
# include <net/if.h>
/* According to glibc/NEWS, <ifaddrs.h> appeared in glibc-2.3. */
-# if !defined(__sgi__) && !defined(SUNOS) && !defined(__HAIKU__) && !defined(__INNOTEK_LIBC__) \
+# if !defined(__sgi__) && !defined(SUNOS) && !defined(__INNOTEK_LIBC__) \
&& !(defined(__GLIBC__) && (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 2)) && !defined(__dietlibc__) && !defined(HPUX)
/* If for any reason ifaddrs.h does not exist on your system, comment out
* the following two lines and an alternative way will be used to fetch
@@ -84,10 +84,6 @@ typedef unsigned long in_addr_t;
# include <netdb.h>
#endif /* UNIX */
-#ifdef __HAIKU__
- #define IPV6_V6ONLY 27
-#endif
-
/* OS/2 stuff */
#if defined(__OS2__)
# define SOCKET int
diff --git a/src/stdafx.h b/src/stdafx.h
index 1f1181b15..98f5d13b9 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -309,12 +309,18 @@ typedef unsigned char byte;
#endif
#if defined(TROUBLED_INTS)
- /* Haiku's types for uint32/int32 are based on longs, which causes
- * trouble all over the place in OpenTTD. */
- #define uint32 uint32_ugly_hack
- #define int32 int32_ugly_hack
+ /* Haiku's types for uint32/int32/uint64/int64 are different than what
+ * they are on other platforms; not in length, but how to print them.
+ * So make them more like the other platforms, to make printf() etc a
+ * little bit easier. */
+# define uint32 uint32_ugly_hack
+# define int32 int32_ugly_hack
+# define uint64 uint64_ugly_hack
+# define int64 int64_ugly_hack
typedef unsigned int uint32_ugly_hack;
typedef signed int int32_ugly_hack;
+ typedef unsigned __int64 uint64_ugly_hack;
+ typedef signed __int64 int64_ugly_hack;
#else
typedef unsigned char uint8;
typedef signed char int8;