summaryrefslogtreecommitdiff
path: root/emulators/pcemu
diff options
context:
space:
mode:
authorgarbled <garbled@pkgsrc.org>1999-04-12 06:46:15 +0000
committergarbled <garbled@pkgsrc.org>1999-04-12 06:46:15 +0000
commit4d1c0ee35ac2dad808ddb193098b17f9fc7c2dd6 (patch)
tree8ebb0c3a249f1e794b0cf8a95daff7de09e8ce3c /emulators/pcemu
parentfa271580d62deaade2c66dbc2964e7c2bb59a322 (diff)
downloadpkgsrc-4d1c0ee35ac2dad808ddb193098b17f9fc7c2dd6.tar.gz
Add new patch-af from Thomas Gerner to fix endian bug on pcemu. Closes PR
#7632.
Diffstat (limited to 'emulators/pcemu')
-rw-r--r--emulators/pcemu/patches/patch-af31
1 files changed, 31 insertions, 0 deletions
diff --git a/emulators/pcemu/patches/patch-af b/emulators/pcemu/patches/patch-af
new file mode 100644
index 00000000000..5e9772c0d12
--- /dev/null
+++ b/emulators/pcemu/patches/patch-af
@@ -0,0 +1,31 @@
+*** cpu.h~ Sun Apr 11 22:45:18 1999
+--- cpu.h Sun Apr 11 22:46:50 1999
+***************
+*** 113,125 ****
+ format and back again. Obviously there is nothing to do for little-endian
+ machines... */
+
+! #if defined(LITTLE_ENDIAN)
+ # define ChangeE(x) (WORD)(x)
+ #else
+ # define ChangeE(x) (WORD)(((x) << 8) | ((BYTE)((x) >> 8)))
+ #endif
+
+! #if defined(LITTLE_ENDIAN) && !defined(ALIGNED_ACCESS)
+ # define ReadWord(x) (*(x))
+ # define WriteWord(x,y) (*(x) = (y))
+ # define CopyWord(x,y) (*x = *y)
+--- 113,125 ----
+ format and back again. Obviously there is nothing to do for little-endian
+ machines... */
+
+! #if BYTE_ORDER == LITTLE_ENDIAN
+ # define ChangeE(x) (WORD)(x)
+ #else
+ # define ChangeE(x) (WORD)(((x) << 8) | ((BYTE)((x) >> 8)))
+ #endif
+
+! #if BYTE_ORDER == LITTLE_ENDIAN && !defined(ALIGNED_ACCESS)
+ # define ReadWord(x) (*(x))
+ # define WriteWord(x,y) (*(x) = (y))
+ # define CopyWord(x,y) (*x = *y)