PKGBUILDs/extra/arj/001_arches_align.patch
2009-10-09 21:23:22 -05:00

34 lines
1.4 KiB
Diff

#DPATCHLEVEL=1
diff -Naur arj-3.10.19.orig/arj_proc.c arj-3.10.19/arj_proc.c
--- arj-3.10.19.orig/arj_proc.c 2004-02-20 14:18:52.000000000 +0100
+++ arj-3.10.22/arj_proc.c 2004-04-08 14:06:58.000000000 +0200
@@ -2898,7 +2898,7 @@
}
#endif
-#if defined(WORDS_BIGENDIAN)&&!defined(ARJDISP)&&!defined(REGISTER)
+#if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && !defined(ARJDISP) && !defined(REGISTER)
/* Model-independent routine to get 2 bytes from far RAM */
unsigned int mget_word(char FAR *p)
diff -Naur arj-3.10.19.orig/arj_proc.h arj-3.10.19/arj_proc.h
--- arj-3.10.19.orig/arj_proc.h 2004-01-25 01:40:00.000000000 +0100
+++ arj-3.10.22/arj_proc.h 2004-04-08 14:07:18.000000000 +0200
@@ -12,7 +12,7 @@
#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
-#ifndef WORDS_BIGENDIAN
+#if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN)
#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
#define mget_dword(p) (*(unsigned long *)(p))
@@ -60,7 +60,7 @@
void unpack_mem(struct mempack *mempack);
void strip_lf(char *str);
char *ltrim(char *str);
-#ifdef WORDS_BIGENDIAN
+#if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN)
unsigned int mget_word(char FAR *p);
unsigned long mget_dword(char FAR *p);
void mput_word(unsigned int w, char FAR *p);