Hi Thomas,
thanks again for your "lecture in c thinking", this is very helpful for someone
who made her way into programming, and IT in general, starting with Java 5 and
Racket (pardon me, it used to be called scheme then :-; ) :-)
>>
>
> Correct, the caller has to provide a storage location
Hi Jon,
thanks a lot for your "find-out-yourself" code - not only will I remember this
method for application to future problems, but also did it really solve my
problem!
In fact the result was _int64 for the seconds and _int32 for the microseconds,
which left me wondering why my code didn't w
keyd...@gmx.de wrote:
> [...]
> Well in this case in fact, I was happy with the result, the 1 looked fine
> given we're having daylight saving time :-;
> [...]
Hello Sigrid,
sure the one is fine, but I think this field really never contains
anything else than 1 when DST is in effect or 0 when it
On Fri, Jul 15, 2011 at 8:40 PM, Jon Zeppieri wrote:
>
> I *think* it's fairly
> safe; it should always err on the side of passing in too large a chunk
> of memory, so it shouldn't start stomping on random addresses.
Just to be clear: the code isn't safe if the tolerances are too
narrow. The code
On Fri, Jul 15, 2011 at 4:28 PM, keyd...@gmx.de wrote:
[snip]
>>
>> There is, however, a PLaneT package (planet dherman/c:4:0) providing the
>> facilities to parse header files and extract structure layout
>> information like that required here using the system's C compiler.
>
>
> Thanks for the
Hi Thomas,
thanks a lot for your quick answer!
> :-/ Perhaps _long or _intptr would be a better choice than _int, since
> they would adapt to the system's word size, which is more likely to be
> right everywhere than _int that is always 32 bits wide, according to the
> Racket documentation, but
keyd...@gmx.de wrote:
> [...]
> In fact I'd assume that using _int for suseconds_t should work fine, too,
> given that man even tells us that
>
> "The values in timeval are opaque types whose length may vary on different
> machines; depending on
> them to have any given length may lead to e
Hi,
I am kind of stuck trying to get the current microsecond from gettimeofday...
and I wonder how best to systematically approach the question of what racket
datatype to choose when defining a FFI function.
From the man page I see that timeval is defined as
struct timeval {
time_
8 matches
Mail list logo