patch-2.1.42 linux/include/asm-sparc/byteorder.h

Next file: linux/include/asm-sparc/irq.h
Previous file: linux/include/asm-ppc/unistd.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.41/linux/include/asm-sparc/byteorder.h linux/include/asm-sparc/byteorder.h
@@ -1,17 +1,17 @@
-/* $Id: byteorder.h,v 1.12 1996/12/19 08:08:20 davem Exp $ */
+/* $Id: byteorder.h,v 1.13 1997/05/26 23:37:46 davem Exp $ */
 #ifndef _SPARC_BYTEORDER_H
 #define _SPARC_BYTEORDER_H
 
-#define ntohl(x) (x)
-#define ntohs(x) (x)
-#define htonl(x) (x)
-#define htons(x) (x)
+#define ntohl(x) ((unsigned long int)(x))
+#define ntohs(x) ((unsigned short int)(x))
+#define htonl(x) ((unsigned long int)(x))
+#define htons(x) ((unsigned short int)(x))
 
 /* Some programs depend upon these being around. */
-#define __constant_ntohl(x) (x)
-#define __constant_ntohs(x) (x)
-#define __constant_htonl(x) (x)
-#define __constant_htons(x) (x)
+#define __constant_ntohl(x) ((unsigned long int)(x))
+#define __constant_ntohs(x) ((unsigned short int)(x))
+#define __constant_htonl(x) ((unsigned long int)(x))
+#define __constant_htons(x) ((unsigned short int)(x))
 
 #ifndef __BIG_ENDIAN
 #define __BIG_ENDIAN 4321

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov