From owner-freebsd-current Sun Mar 24 14:50:51 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id OAA29423 for current-outgoing; Sun, 24 Mar 1996 14:50:51 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA29414 for ; Sun, 24 Mar 1996 14:50:47 -0800 (PST) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id AAA04230 for ; Mon, 25 Mar 1996 00:50:44 +0200 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id XAA01330 for freebsd-current@FreeBSD.org; Sun, 24 Mar 1996 23:50:43 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.7.4/8.6.9) id XAA06456 for freebsd-current@FreeBSD.org; Sun, 24 Mar 1996 23:41:49 +0100 (MET) From: J Wunsch Message-Id: <199603242241.XAA06456@uriah.heep.sax.de> Subject: Re: lint To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Sun, 24 Mar 1996 23:41:48 +0100 (MET) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199603241953.TAA01226@originat.demon.co.uk> from "Paul Richards" at Mar 24, 96 07:53:39 pm X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL24 ME8a] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk As Paul Richards wrote: > I've enabled lint. There's a lot to do to make it useable since FreeBSD > isn't very lint clean. /* LONGLONG */ needs to be added to a lot of > headers and there's a bit of a problem with the htonl macro since it > makes lint abort with a syntax error. Doesn't make lint very usefull > on real programs. (There are more things to care for, see my reply to your commit mail.) Here's my previous fix for the [hn]to[nh][sl] problem. I'm not sure if it's totally correct, but it used to work. Btw., once all the libs are lintable, we should enable the lint target in the Makefiles. If i understood it right, this will cause a lint run for each compilation. Index: sys/i386/include/endian.h =================================================================== RCS file: /home/cvs/src/sys/i386/include/endian.h,v retrieving revision 1.6 diff -u -r1.6 endian.h --- endian.h 1995/02/12 08:31:31 1.6 +++ endian.h 1995/10/15 13:22:40 @@ -107,14 +107,24 @@ #else +#ifndef lint #define ntohl __byte_swap_long #define ntohs __byte_swap_word #define htonl __byte_swap_long #define htons __byte_swap_word +#else /* lint */ +__BEGIN_DECLS +unsigned long ntohl __P((unsigned long)); +unsigned short ntohs __P((unsigned short)); +unsigned long htonl __P((unsigned long)); +unsigned short htons __P((unsigned short)); +__END_DECLS +#endif /* lint */ + +#define NTOHL(x) (x) = ntohl((unsigned long)x) +#define NTOHS(x) (x) = ntohs((unsigned short)x) +#define HTONL(x) (x) = htonl((unsigned long)x) +#define HTONS(x) (x) = htons((unsigned short)x) -#define NTOHL(x) (x) = ntohl((u_long)x) -#define NTOHS(x) (x) = ntohs((u_short)x) -#define HTONL(x) (x) = htonl((u_long)x) -#define HTONS(x) (x) = htons((u_short)x) #endif #endif /* _MACHINE_ENDIAN_H_ */ -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)