Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 1997 23:14:26 +1100
From:      Bruce Evans <bde@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
Message-ID:  <199703171214.XAA10685@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>  Modified:    sys/i386/include  endian.h
>  Log:
>  Don't try to lint the gcc extension byte-swapping macros.
>  
>  Submitted by:	Eivind Eklund <eivind@dimaga.com>

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



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