Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Feb 2002 17:17:48 -0500
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Mike Barcroft <mike@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/games/fortune/fortune fortune.c src/games/fortune/strfile strfile.c src/games/fortune/unstr unstr.c src/include/arpa inet.h src/include/rpc xdr.h src/lib/libc/alpha/net byte_swap_2.S byte_swap_4.S htonl.S htons.S ntohl.S ntohs.S ...
Message-ID:  <20020222171748.A81125@grasshopper.cs.duke.edu>
In-Reply-To: <200202182035.g1IKZRX56719@freefall.freebsd.org>; from mike@FreeBSD.org on Mon, Feb 18, 2002 at 12:35:27PM -0800
References:  <200202182035.g1IKZRX56719@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

When compiling a kernel on alpha, I now see:

"warning: implicit declaration of function `__ntohs'"

In all places which use ntohs(), similar for the other 3 byteswapping
routines. Don't you think these should at least be prototyped in
sys/alpha/include/endian.h??


Does this look OK?  It seems to fix the compile warnings, but I don't
know what your plans are..

Drew

Index: alpha/include/endian.h
===================================================================
RCS file: /home/ncvs/src/sys/alpha/include/endian.h,v
retrieving revision 1.6
diff -u -r1.6 endian.h
--- alpha/include/endian.h	18 Feb 2002 20:35:20 -0000	1.6
+++ alpha/include/endian.h	22 Feb 2002 22:14:57 -0000
@@ -58,4 +58,11 @@
 #define	BYTE_ORDER	LITTLE_ENDIAN
 #endif /* !_POSIX_SOURCE */
 
+#if defined(_KERNEL)
+__uint32_t __htonl(__uint32_t __x);
+__uint16_t __htons(__uint16_t __x);
+__uint32_t __ntohl(__uint32_t __x);
+__uint16_t __ntohs(__uint16_t __x);
+#endif /* _KERNEL */
+
 #endif /* !_MACHINE_ENDIAN_H_ */

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020222171748.A81125>