Fix compilation problem with -current for 9 days 19 hours.

This commit is contained in:
R. Imura 2000-10-24 15:25:27 +00:00
parent 0e95fdac80
commit 519aae125c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=34185

View file

@ -1,11 +1,28 @@
--- kmidi/config.h.orig Sat Sep 18 16:36:13 1999
+++ kmidi/config.h Sat Sep 18 16:36:49 1999
@@ -321,7 +321,7 @@
--- kmidi/config.h.orig Mon Mar 29 21:24:38 1999
+++ kmidi/config.h Wed Oct 25 00:16:44 2000
@@ -321,9 +321,9 @@
#ifdef LITTLE_ENDIAN
#define LE_SHORT(x) x
#define LE_LONG(x) x
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(__alpha__)
#define BE_SHORT(x) __byte_swap_word(x)
#define BE_LONG(x) __byte_swap_long(x)
-#define BE_SHORT(x) __byte_swap_word(x)
-#define BE_LONG(x) __byte_swap_long(x)
+#if defined(__FreeBSD__) && defined(__i386__)
+#define BE_SHORT(x) NTOHS(x)
+#define BE_LONG(x) NTOHL(x)
#else
#define BE_SHORT(x) XCHG_SHORT(x)
#define BE_LONG(x) XCHG_LONG(x)
@@ -331,9 +331,9 @@
#else
#define BE_SHORT(x) x
#define BE_LONG(x) x
-#ifdef __FreeBSD__
-#define LE_SHORT(x) __byte_swap_word(x)
-#define LE_LONG(x) __byte_swap_long(x)
+#if defined(__FreeBSD__) && defined(__i386__)
+#define LE_SHORT(x) NTOHS(x)
+#define LE_LONG(x) NTOHL(x)
#else
#define LE_SHORT(x) XCHG_SHORT(x)
#define LE_LONG(x) XCHG_LONG(x)