Subject: Re: 64-bit daddr_t problems with libsa
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 01/31/2003 15:05:49
I'd like to commit the follow change soon (Matt Green's patch modified
David Laight to use typedefs all the time for daddr_t) and add

	# Use small daddr_t to avoid code bloat
	CPPFLAGS+=      -D__daddr_t=int32_t

to these Makefiles:

	sys/arch/alpha/stand/bootxx_ffs/Makefile
	sys/arch/alpha/stand/bootxx_lfs/Makefile
	sys/arch/pmax/stand/bootxx_ffs/Makefile
	sys/arch/pmax/stand/bootxx_lfs/Makefile
	sys/arch/sbmips/stand/bootxx_ffs/Makefile
	sys/arch/sbmips/stand/bootxx_lfs/Makefile

I've confirmed the changes work on alpha and pmax.

No objections to this much?  At least this gets the bootblocks on the
above machines working again.  We can worry about other space-saving
ideas later on...

Simon.
--
Simon Burge                                   <simonb@wasabisystems.com>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/



Index: types.h
===================================================================
RCS file: /cvsroot/src/sys/sys/types.h,v
retrieving revision 1.55
diff -d -p -u -r1.55 types.h
--- types.h	2003/01/24 21:55:19	1.55
+++ types.h	2003/01/31 03:59:30
@@ -138,7 +138,13 @@ typedef	__caddr_t	caddr_t;	/* core addre
 #define	caddr_t		__caddr_t
 #endif
 
+#ifdef __daddr_t
+typedef	__daddr_t	daddr_t;	/* disk address */
+#undef __daddr_t
+#else
 typedef	int64_t		daddr_t;	/* disk address */
+#endif
+
 typedef	uint32_t	dev_t;		/* device number */
 typedef	uint32_t	fixpt_t;	/* fixed point number */