Re: data sizes in linux



On Thu, Aug 31, 2000 at 12:07:52PM +1100, Nathan Hurst wrote:
> On Thu, 31 Aug 2000, Jack M. wrote:
> > What are the data sizes in linux?. Like how many bits ar in char, int,..
> 
> /usr/include/bits/types.h

This is a function not just of linux but also the hardware --
you will in general get different results on an Alpha, a SPARC and
a pentium system.

You should therefore use sizeof() rather than hard-wiring the sizes
as constants.

Lee / Ankh

-- 
Liam Quin - Barefoot in Toronto - liam@holoweb.net - http://www.holoweb.net/
Ankh: irc.sorcery.net www.valinor.sorcery.net irc.gnome.org www.advogato.org
author, The Open Source XML Database Toolkit, Wiley, August 2000
Co-author, The XML Specification Guide, Wiley, 1999





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]