Subject: Re: 64-bit daddr_t problems with libsa
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 01/30/2003 15:36:04
> 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.

	David

-- 
David Laight: david@l8s.co.uk