Re: Definition of off64_t



On Tue, 30 Sep 2008 20:40:54 -0500, Steven G. Kargl wrote:

In article
<19b8d345-e901-4c63-8035-c7ba6f0943df@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
TC <C.discussions@xxxxxxxxx> writes:
Hi,

I am trying to port an application written on Linux to FreeBSD. During
compile, I am getting an error saying that off64_t is not defined.
Which header file do I need to include to get the definition for
off64_t ?

off64_t isn't defined on FreeBSD in a header supplied by the system.
You'll need to look at the definition on linux and find the appropriate
value in stdint.h

It's almost certainly off_t (aka long long or perhaps unsigned long long
in c99). To the OP: FreeBSD doesn't have off64_t because off_t et al are
64 bits, even on 32-bit systems, and have been ever since the net4.4
release from UCB (at least). Consequently, there isn't a separate set of
interfaces for 32-bit and 64-bit files or file systems, they're all 64-
bit.

On the flip-side, if the OP doesn't want to fix the code, I suppose that
he could compile it as linux, under linux emulation...

Cheers,

--
Andrew
.