summaryrefslogtreecommitdiff
path: root/games/xdoom/patches/patch-az
blob: 9df4adcfe542a99a2ef05db6868340e74705bddf (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
$NetBSD: patch-az,v 1.1 2000/02/03 16:01:16 abs Exp $

--- sndserv/wadread.c.orig	Thu Jan 30 19:54:23 1997
+++ sndserv/wadread.c	Thu Feb  3 01:34:06 2000
@@ -94,12 +94,7 @@
 // Something new.
 // This version of w_wad.c does handle endianess.
 //
-#ifndef __BIG_ENDIAN__
-
-#define LONG(x) (x)
-#define SHORT(x) (x)
-
-#else
+#if defined(__BIG_ENDIAN__) || (BYTE_ORDER == BIG_ENDIAN)
 
 #define LONG(x) ((long)SwapLONG((unsigned long) (x)))
 #define SHORT(x) ((short)SwapSHORT((unsigned short) (x)))
@@ -118,6 +113,11 @@
     return
 	(x>>8) | (x<<8);
 }
+
+#else
+
+#define LONG(x) (x)
+#define SHORT(x) (x)
 
 #endif