Yes, you are right.  A check of stdint.h shows:

/* Largest integral types.  */
#if __WORDSIZE == 64
typedef long int                intmax_t;
typedef unsigned long int       uintmax_t;
#else
__extension__
typedef long long int           intmax_t;
__extension__
typedef unsigned long long int  uintmax_t;
#endif

Thank you for pointing out my error.  I was suggesting long long,
but uintmax_t is ALREADY unsigned long long.

Thanks again.

Pablo M.
***


--- On Wed, 2/18/09, fooler mail <[email protected]> wrote:

> From: fooler mail <[email protected]>
> Subject: Re: [plug] Maximum number of lines wc can count
> To: "Philippine Linux Users' Group (PLUG) Technical Discussion List" 
> <[email protected]>
> Date: Wednesday, February 18, 2009, 7:25 PM
> On Wed, Feb 18, 2009 at 7:08 PM, Pablo Manalastas
> <[email protected]> wrote:
> > uintmax_t can't count to 100 billion. But since
> you have coreutils
> > source, you can always recompile a version of wc using
> type
> > long long for total_lines.  Galing talaga ng open
> source!
> 
> doc.. uintmax_t or unsigned max integer on 32 bit hardware
> is 64 bit
> wide (see sizeof(uintmax_t) using stdint.h header)..
> 
> therefore 2^64 is 1.8x10^19 which is far greater than 100
> billion or
> 100x10^9 :->
> 
> fooler.
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph

Reply via email to