patch source so this works on big endian machines
This commit is contained in:
parent
104eb209bf
commit
ec5c1c9854
47
archivers/unace/patches/patch-ab
Normal file
47
archivers/unace/patches/patch-ab
Normal file
@ -0,0 +1,47 @@
|
||||
--- portable.h.orig Thu Oct 21 18:39:51 1999
|
||||
+++ portable.h Thu Oct 21 18:41:26 1999
|
||||
@@ -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 */
|
||||
|
29
archivers/unace/patches/patch-ac
Normal file
29
archivers/unace/patches/patch-ac
Normal file
@ -0,0 +1,29 @@
|
||||
--- uac_dcpr.c.orig Thu Oct 21 18:31:14 1999
|
||||
+++ uac_dcpr.c Thu Oct 21 18:38:15 1999
|
||||
@@ -102,7 +102,7 @@
|
||||
buf_rd[0] = buf_rd[size_rdb - 2];
|
||||
buf_rd[1] = buf_rd[size_rdb - 1];
|
||||
read_adds_blk((CHAR *) & buf_rd[2], i);
|
||||
-#ifdef HI_LO_BYTE_ORDER
|
||||
+#if BYTE_ORDER == BIG_ENDIAN
|
||||
{
|
||||
ULONG *p;
|
||||
i>>=2; // count LONGs not BYTEs
|
||||
@@ -137,7 +137,7 @@
|
||||
i = comm_cpr_size > size_rdb * sizeof(LONG) ? size_rdb * sizeof(LONG) : comm_cpr_size;
|
||||
if (!f_err)
|
||||
memcpy(buf_rd, comm, i);
|
||||
-#ifdef HI_LO_BYTE_ORDER
|
||||
+#if BYTE_ORDER == BIG_ENDIAN
|
||||
{
|
||||
ULONG *p;
|
||||
i>>=2; // count LONGs not BYTEs
|
||||
@@ -510,7 +510,7 @@
|
||||
|
||||
i = size_rdb * sizeof(LONG);
|
||||
read_adds_blk((CHAR *) buf_rd, i);
|
||||
-#ifdef HI_LO_BYTE_ORDER
|
||||
+#if BYTE_ORDER == BIG_ENDIAN
|
||||
{
|
||||
ULONG *p;
|
||||
i>>=2; // count LONGs not BYTEs
|
11
archivers/unace/patches/patch-ad
Normal file
11
archivers/unace/patches/patch-ad
Normal file
@ -0,0 +1,11 @@
|
||||
--- unace.c.orig Thu Oct 21 18:39:24 1999
|
||||
+++ unace.c Thu Oct 21 18:39:46 1999
|
||||
@@ -120,7 +120,7 @@
|
||||
if (read(archan, &head, 4)<4)
|
||||
return 0; // read CRC and header size
|
||||
|
||||
-#ifdef HI_LO_BYTE_ORDER
|
||||
+#if BYTE_ORDER == BIG_ENDIAN
|
||||
WORDswap(&head.HEAD_CRC);
|
||||
WORDswap(&head.HEAD_SIZE);
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user