Hi. I'm copying below a question i sent to another list about hsc2hs
(and for which i got no response), in the hopes that it will be not be
OT here. My apologies if it is!
I'm trying to write a simple C binding for statfs(2). Simplifying,
writing an hsc file that contains the following snippet:
On Tue, Feb 02, 2010 at 03:51:18PM +0100, Jose A. Ortega Ruiz wrote:
> [...] The problem is that the size and
> some of the offsets of the C struct statfs computed by hsc2c are wrong:
> i'm in a 32bit linux system, and i've checked, using a C program, that
> sizeof(struct statfs) is 64 (hsc2 is giv
Ross Paterson writes:
> On Tue, Feb 02, 2010 at 03:51:18PM +0100, Jose A. Ortega Ruiz wrote:
>> [...] The problem is that the size and
>> some of the offsets of the C struct statfs computed by hsc2c are wrong:
>> i'm in a 32bit linux system, and i've checked, using a C program, that
>> sizeof(str
Ross Paterson writes:
> If you compile your C program with -D_FILE_OFFSET_BITS=64 you'll get the
> same numbers that hsc2hs does.
Aha, that was the key to solve my problem: programs or libraries
compiled with that flag must use statfs64() instead of statfs(). Binding
to the former in my .hsc pro