I found that custom IO warrior modules I have been using successfully with both windows, mac and Linux do not function properly under
a 64 bit version of linux (in my case Ubuntu 11.04).
I found the methods to convert between Handles and JLongs to be suspect, in particular
I think the (int) casts are misplaced.jlong HandleToJLong(IOWKIT_HANDLE handle)
{
return (jlong) ((int) handle);
}
IOWKIT_HANDLE JLongToHandle(jlong handle)
{
return (IOWKIT_HANDLE) ((int) handle);
}
After some searching I found that the following change in code helps:
which is consistent with the definitions of the types jlong and IOWKIT_HANDLE.#define HandleToJLong(h) ((jlong)(h))
#define JLongToHandle(h) ((IOWKIT_HANDLE)(h))
This has also the side effect that it is a macro expansion, saving the call return overhead in the original.
I was able to test it under 32 bit Linux (my office laptop) and my home pc which runs the said 64 bit ubuntu version.)
It would be nice if someone would update the iowarrior SDK distribution.
Kind regards,
Pieter van den Hombergh.
BTW we are using the iowarrior in our courses since 2007 as you may find onhttp://prj32.fontysvenlo.org.