Date: Tue, 22 Apr 1997 00:14:46 -0400 (EDT) From: Chuck Robey <chuckr@mat.net> To: Adrian Chadd <adrian@staff.psinet.net.au> Cc: freebsd-hackers@freebsd.org Subject: Re: 64 bit number definitions? Message-ID: <Pine.BSF.3.91.970422001259.4630H-100000@Journey2.mat.net> In-Reply-To: <Pine.LNX.3.93.970422111805.5455C-100000@staff.psinet.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Apr 1997, Adrian Chadd wrote:
> Hi.
>
> Is there anywhere a 64 bit type in C I can get my hands on?
> (the longest i've seen builtin to the compiler is the unsigned long, but I
> commonly write more than 4 gigabytes to tape at once).
>
> Which reminds me, freebsd's GNU tar apparently uses an "int" type for
> tot_written, that doesn't look like it cant count over 32k bytes.
I've recently (for a class) been forced to code under dos, so I think I
know where your size guesses are coming from, but they're in error. Run
the following program:
#include <stdio.h>
#include <sys/types.h>
int main()
{
int c;
long l;
quad_t q;
printf( "sizeof int is %d, long %d, and quad %d\n",
sizeof( int ), sizeof( long ), sizeof( quad_t ) );
}
which has output "sizeof int is 4, long 4, and quad 8"
----------------------------+-----------------------------------------------
Chuck Robey | Interests include any kind of voice or data
chuckr@eng.umd.edu | communications topic, C programming, and Unix.
9120 Edmonston Ct #302 |
Greenbelt, MD 20770 | I run Journey2 and picnic, both FreeBSD
(301) 220-2114 | version 3.0 current -- and great FUN!
----------------------------+-----------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970422001259.4630H-100000>
