$NetBSD: patch-bi,v 1.1 2004/01/08 12:06:37 agc Exp $

--- include/netatalk/endian.h	2004/01/08 11:45:27	1.1
+++ include/netatalk/endian.h	2004/01/08 11:56:33
@@ -8,17 +8,25 @@
 
 #ifdef _IBMR2
 #include <sys/machine.h>
-#endif _IBMR2
+#endif /* _IBMR2 */
 
 #ifdef linux
 #include <bytesex.h>
 #define BYTE_ORDER	__BYTE_ORDER
 #include <asm/byteorder.h>
-#endif linux
+#endif /* linux */
 
 #ifdef __svr4__
 #include <sys/byteorder.h>
-#endif __svr4__
+#endif /* __svr4__ */
+
+#include <sys/param.h>
+
+/* All Net2-derived systems should have <machine/endian.h> */
+
+#if (defined(BSD) && BSD >= 199306)
+#include <machine/endian.h>
+#endif
 
 # ifndef BYTE_ORDER
 #define LITTLE_ENDIAN	1234
@@ -28,9 +36,9 @@
 #ifdef sun
 #ifdef i386
 #define BYTE_ORDER	LITTLE_ENDIAN
-#else i386
+#else /* i386 */
 #define BYTE_ORDER	BIG_ENDIAN
-#endif i386
+#endif /* i386 */
 #else
 #ifdef MIPSEB
 #define BYTE_ORDER	BIG_ENDIAN
@@ -39,10 +47,10 @@
 #define BYTE_ORDER	LITTLE_ENDIAN
 #else
 Like, what is your byte order, man?
-#endif MIPSEL
-#endif MIPSEB
-#endif sun
-# endif BYTE_ORDER
+#endif /* MIPSEL */
+#endif /* MIPSEB */
+#endif /* sun */
+# endif /* BYTE_ORDER */
 
 # ifndef ntohl
 # if defined( sun ) || defined( ultrix ) || defined( _IBMR2 )
@@ -59,15 +67,15 @@
 #define	htonl(x)	nuxi_l(x)
 #define	htons(x)	nuxi_s(x)
 
-#else mips KERNEL
+#else /* mips KERNEL */
 
 #if !( defined( sun ) && defined( i386 ))
 unsigned short	ntohs(), htons();
 unsigned long	ntohl(), htonl();
-#endif sun i386
+#endif /* sun i386 */
 
-#endif mips KERNEL
-#endif BYTE_ORDER
-# endif sun ultrix _IBMR2
-# endif ntohl
-#  endif _ATALK_ENDIAN_H_
+#endif /* mips KERNEL */
+#endif /* BYTE_ORDER */
+# endif /* sun ultrix _IBMR2 */
+# endif /* ntohl */
+#  endif /* _ATALK_ENDIAN_H_ */
