Subject: Re: 64-bit daddr_t problems with libsa
To: David Laight <david@l8s.co.uk>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 01/31/2003 12:09:23
David Laight wrote:
> > To get back extra space, Matt Green came up with the following patch
> > for <sys/types.h>
> >
> > +#ifndef daddr_t
> > typedef int64_t daddr_t; /* disk address */
> > +#endif
> > +
> >
> > and then adding
> >
> > CPPFLAGS+= -Ddaddr_t='unsigned int'
> >
> > to any Makefiles where you need a smaller ufs.o or lfs.o.
>
> Wouldn't it be better to do:
>
> #ifdef _daddr_t
> typedef _daddr_t daddr_t;
> under _daddr_t
> #else
> typedef int64_t daddr_t;
> #endif
>
> with CPPFLAGS+=-D_addr_t=int32_t
>
> (or unsigned equivs)
>
> That way daddr_t is alows a typedef.
This seems good too (assuming your compiler treats "under" the same way
mine treats "#undef" :-).
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Support and Service: http://www.wasabisystems.com/