From ec5c1c985432ecc947e0f07f981f3babf90b2d69 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 29 Oct 1999 20:27:20 +0000 Subject: [PATCH] patch source so this works on big endian machines --- archivers/unace/patches/patch-ab | 47 ++++++++++++++++++++++++++++++++ archivers/unace/patches/patch-ac | 29 ++++++++++++++++++++ archivers/unace/patches/patch-ad | 11 ++++++++ 3 files changed, 87 insertions(+) create mode 100644 archivers/unace/patches/patch-ab create mode 100644 archivers/unace/patches/patch-ac create mode 100644 archivers/unace/patches/patch-ad diff --git a/archivers/unace/patches/patch-ab b/archivers/unace/patches/patch-ab new file mode 100644 index 00000000000..f3edd1b3300 --- /dev/null +++ b/archivers/unace/patches/patch-ab @@ -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 */ + diff --git a/archivers/unace/patches/patch-ac b/archivers/unace/patches/patch-ac new file mode 100644 index 00000000000..e8a1b48a65e --- /dev/null +++ b/archivers/unace/patches/patch-ac @@ -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 diff --git a/archivers/unace/patches/patch-ad b/archivers/unace/patches/patch-ad new file mode 100644 index 00000000000..4e1782bd619 --- /dev/null +++ b/archivers/unace/patches/patch-ad @@ -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