319fa1c71d
Alexander S . Guy. Some minor packaging tweaks. Uses cd0c by default, as this is the most likely place for a CD-Rom drive.
37 lines
988 B
Plaintext
37 lines
988 B
Plaintext
$OpenBSD: patch-interface_utils_h,v 1.1.1.1 2000/09/21 16:07:21 espie Exp $
|
|
--- interface/utils.h.orig Tue Sep 19 16:20:29 2000
|
|
+++ interface/utils.h Tue Sep 19 16:16:36 2000
|
|
@@ -1,4 +1,16 @@
|
|
+#ifdef __linux__
|
|
#include <endian.h>
|
|
+#endif
|
|
+#ifdef __NetBSD__
|
|
+#include <sys/param.h>
|
|
+#if __NetBSD_Version__ >= 104010000
|
|
+#include <sys/endian.h>
|
|
+#else
|
|
+#include <machine/endian.h>
|
|
+#include <machine/bswap.h>
|
|
+#endif
|
|
+#include <err.h> /* XXX */
|
|
+#endif
|
|
#include <stdio.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
@@ -13,6 +25,7 @@ static inline int bigendianp(void){
|
|
return(1);
|
|
}
|
|
|
|
+#if !defined(__OpenBSD__)
|
|
static inline size32 swap32(size32 x){
|
|
return((((unsigned size32)x & 0x000000ffU) << 24) |
|
|
(((unsigned size32)x & 0x0000ff00U) << 8) |
|
|
@@ -24,6 +37,7 @@ static inline size16 swap16(size16 x){
|
|
return((((unsigned size16)x & 0x00ffU) << 8) |
|
|
(((unsigned size16)x & 0xff00U) >> 8));
|
|
}
|
|
+#endif /* !defined(__OpenBSD__) */
|
|
|
|
#if BYTE_ORDER == LITTLE_ENDIAN
|
|
|