Subject: Should SIZE_T_MAX be defined (machine dependantly) everywhere?
To: None <>
From: - Greg Earle <earle@isolar.Tujunga.CA.US>
List: current-users
Date: 05/17/1994 04:31:54
	I'm running NetBSD/SPARC with Theo's last binary snapshot and I
downloaded Saturday's tar balls and set off to do a "make build".

	It fell over in .../lib/libc/gen/nlist.c because __fdnlist() wants
to check to see if a file is too large to mmap(), and it compares it
against SIZE_T_MAX.  From what I can tell, SIZE_T_MAX is only defined in
limits.h for the i386, m68k and pmax architectures.  (No wonder I hadn't seen
anything posted about it, since it works on i386 (-: )

	Should there be a SIZE_T_MAX in every limits.h for all architectures
(i.e., in /usr/src/sys/arch/<all arches>/include/limits.h, so it'll end up in
/usr/include/machine/limits.h), or should there be a global default in
/usr/include/sys/syslimits.h, perhaps using "#ifndef SIZE_T_MAX"?  To put it
another way, I haven't seen any port where _SIZE_T_ wasn't an "unsigned int";
would putting "#ifndef SIZE_T_MAX \ #define SIZE_T_MAX UINT_MAX \ #endif" into
the default <sys/syslimits.h> be a Bad Idea?  (Being cautious here ... )

	In the meantime, how do I "properly" fix lib/libc/gen/nlist.c <grin>

	- Greg