On Wednesday 09 January 2002 17:22, fooler wrote:
> off_t can be found at /usr/include/sys/types.h... it says there it is
> a numeric data type, therefore you can use %d in your printf string
> format.
ahh, ok. i was confused because 2.4 introduced files (and file
offsets, of course) larger than 2G. looked in various headers and
found some other documents on the web. off_t is normally 32 bits,
so you can use %ld for it. but if you compile with
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
(gcc, Linux 2.4+) then off_t is 64bit. that is, it's a
long long int.
and the format spec for that is "%Ld" or "%qd" or "%lld", all
three work :). very nice to have lots more bits in an int. useful for
more than just very large files.
tiger
--
Gerald Timothy Quimpo [EMAIL PROTECTED] [EMAIL PROTECTED]
Entia non sunt multiplicanda praetere necessitatem
Mene sakhet ur seveh
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]