openbsd-ports/archivers/unace/patches/patch-portable_h
2001-03-24 22:31:18 +00:00

49 lines
1.3 KiB
Plaintext

$OpenBSD: patch-portable_h,v 1.1 2001/03/24 22:31:19 brad Exp $
--- portable.h.orig Wed Jul 1 04:29:10 1998
+++ portable.h Sat Mar 24 17:30:41 2001
@@ -10,7 +10,7 @@
#include "os.h"
-#ifdef HI_LO_BYTE_ORDER
+#if BYTE_ORDER == BIG_ENDIAN
/* All kinds of inplace swap routines, to reverse from LOHI to HILO byte order */
@@ -59,7 +59,7 @@
*(n) = (*(n) >> 16) | (*(n) << 16) )
#endif /* WORDSWAP */
-#endif /* HI_LO_BYTE_ORDER */
+#endif /* BIG_ENDIAN */
/* GENERIC: Convert to LONG or WORD from BYTE-Pointer-to-LOHI-byte-order data,
@@ -67,7 +67,7 @@
* p is a pointer to char.
*/
-#ifdef HI_LO_BYTE_ORDER
+#if BYTE_ORDER == BIG_ENDIAN
#define BUFP2WORD(p) ((UWORD)*(p)++ | ((*(p)++)<<8))
#define BUFP2LONG(p) ((ULONG)*(p)++ | ((*(p)++)<<8) | ((*(p)++)<<16) | ((*(p)++)<<24))
@@ -75,7 +75,7 @@
#define BUF2WORD(p) ((UWORD)*(p) | (*((p)+1)<<8))
#define BUF2LONG(p) ((ULONG)*(p) | (*((p)+1)<<8) | (*((p)+2)<<16) | (*((p)+3)<<24))
-#else /* HI_LO_BYTE_ORDER */
+#else /* BIG_ENDIAN */
#define BUFP2WORD(p) *(UWORD*)((p+=2)-2)
#define BUFP2LONG(p) *(ULONG*)((p+=4)-4)
@@ -83,7 +83,7 @@
#define BUF2WORD(p) (*(UWORD*)p)
#define BUF2LONG(p) (*(ULONG*)p)
-#endif /* !HI_LO_BYTE_ORDER */
+#endif /* !BIG_ENDIAN */
/* Timestamp macros */