Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 1996 22:56:30 +0000 (GMT)
From:      Paul Richards <paul@originat.demon.co.uk>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: fseek
Message-ID:  <199603242256.WAA02597@originat.demon.co.uk>
In-Reply-To: <199603241805.TAA04491@uriah.heep.sax.de> from "J Wunsch" at Mar 24, 96 07:05:26 pm

next in thread | previous in thread | raw e-mail | index | archive | help
In reply to J Wunsch who said
> 
> Our definitions are ``more correct'', but violate ANSI.  They have to
> be changed, or we cannot claim them ANSI compliant.  (I've also
> stumpled across this when importing lint.)

I've changed this to be ANSI compliant now.

> Btw., since you happen to continue the work on lint...  Our libc
> includes two different ``struct pmap''s.  One is the well-known one
> for the portmapper, the other one sneaked in from the VM code and
> describes a ``page map'' (or something like this).  We need to change
> one of them, most likely the latter one, in order to ever get libc
> linted.  I've once tried to add a ``pmap_t'' typedef for the latter
> type, but broke everything with it, since i've apparently overlooked
> something.  This was about the point where i've stopped attempting to
> get lint fully included.

I'll make a note of this.

> 
> More nits back from the old days (might or might not still apply):
> 
> <machine/endian.h> has definitions of the form:
> 
>  #define        ntohl   __byte_swap_long

Umm, the htonl macro (and I suspect this one) completely and utterly
breaks lint. It flags a syntax error for the macro and then aborts
some time later because it's unable to recover from it. As an example
in our tree look at netstat. I first spotted it lint'ing Apache.

originat:usr.bin/netstat% lint *
if.c:
if.c:168: syntax error
if.c:168: __X undefined
if.c:168: syntax error
if.c:174: case not in switch
if.c:182: syntax error
if.c:182: __X undefined
if.c:182: syntax error
if.c:183: netnum undefined
if.c:186: sipx undefined
if.c:206: case not in switch
if.c:215: default outside switch
if.c:232: syntax error
if.c:232: cannot recover from previous errors

It's surprising how much of a mess our code is in actually when you run
lint across it. I've only got access to FreeBSD at weekends since I work
away during the week but I'll gradually work my way through all this if
no-one works on it in the meantime.

-- 
  Paul Richards, Originative Solutions Ltd.
  Internet: paul@netcraft.co.uk, http://www.netcraft.co.uk
  Phone: 0370 462071 (Mobile), +44 1225 447500 (work)



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