summaryrefslogtreecommitdiff
path: root/emulators/swarm/patches/patch-aa
blob: 4596e7afd2370f71d4054ef14f62dd38dd999562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-aa,v 1.3 2002/04/01 05:50:45 dmcmahill Exp $

fix tests for endianness and use our own header files to get
int64_t and uint64_t

--- swarm_types.h.orig	Tue Apr 10 09:46:10 2001
+++ swarm_types.h
@@ -26,9 +26,10 @@
 #ifndef __SWARM_TYPES_H__
 #define __SWARM_TYPES_H__
 
-#ifdef sun4
+#include <sys/endian.h>
+#if BYTE_ORDER == BIG_ENDIAN
 #define __BIG_ENDIAN__
-#else /* ix86 / alpha / arm32 */
+#else
 #define __LITTLE_ENDIAN__
 #endif
 
@@ -45,6 +46,10 @@
 typedef unsigned short            uint16_t;
 typedef unsigned int              uint32_t;
 
+#ifdef __NetBSD__
+#include <sys/types.h>
+#include <sys/inttypes.h>
+#else
 #ifndef WIN32
 #ifndef __int8_t_defined 
 typedef long long int             int64_t;
@@ -54,7 +59,7 @@
 typedef INT64			  int64_t;
 typedef UINT64                    uint64_t;
 #endif // !WIN32
-
+#endif /* __NetBSD */
 typedef int                       bool_t;
 
 #ifndef WIN32