PATCH to libiberty: size_t portability

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Sat Jul 22 07:42:00 GMT 2000


 > From: Zack Weinberg <zack@wolery.cumb.org>
 > 
 > On Fri, Jul 21, 2000 at 09:08:10PM -0500, Michael Sokolov wrote:
 > > Hi there,
 > > 
 > > Below is a patch to libiberty fixing a 4.3BSD build failure. To
 > > use size_t portably, one must #include <sys/types.h> whereever
 > > it's used, in case it's defined there, and add AC_TYPE_SIZE_T to
 > > configure.in, in case it's missing altogether. This patch does
 > > so.
 > 
 > I do not believe it is safe to assume the existence of <sys/types.h>,
 > that needs its own autoconf check.  [I could be wrong.]
 > zw

We include sys/types.h unconditionally in libiberty and
gcc/{t}system.h so we don't need the AC check for the header.

Similarly, we don't use AC_TYPE_SIZE_T since sys/types.h universally
declares size_t on all systems (at least those encountered so far.)

I would just include sys/types.h and nothing more.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


More information about the Gcc-patches mailing list