From owner-cvs-sys Mon Mar 17 04:21:02 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA07783 for cvs-sys-outgoing; Mon, 17 Mar 1997 04:21:02 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA07766; Mon, 17 Mar 1997 04:20:55 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id XAA10685; Mon, 17 Mar 1997 23:14:26 +1100 Date: Mon, 17 Mar 1997 23:14:26 +1100 From: Bruce Evans Message-Id: <199703171214.XAA10685@godzilla.zeta.org.au> To: cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, nate@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/include endian.h Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Modified: sys/i386/include endian.h > Log: > Don't try to lint the gcc extension byte-swapping macros. > > Submitted by: Eivind Eklund Erm, we were still discussing why the apparently-wrong lint test wasn't really wrong. It was to get calls to the ntohl() etc. functions linted in all cases. The bugs near here have nothing to do with linting the gcc macros. __GNUC__ is not defined when the "compiler" is lint, so lint never sees these macros. The bugs are: 1. There is a redundant BYTE_ORDER == BIG_ENDIAN test and associated dead code. 2. There are no prototypes for the ntohl() etc. _functions_. Changing the lint test broke the linting of calls to these these functions. 3. The HTOHL() etc. macros are not documented. See the NetBSD endian.h for the (obvious) fixes for (1) and (2) and for not-so-obvious other improvements. Bruce