Hi,

Attached is a patch that is useful (but not essential) for Windows FFI
to work slightly better.

Hugs builds up a command line that it passes to the compiler, for example:

gcc -blah1 <filename> -blah2

In certain compilers -blah2 would not apply to <filename>, as a result
when compiling with MSVC, the use of blah2 after <filename> generates
a warning, but still works. The simple solution is the attached patch
which moves -blah2 before <filename>.

Does this harm gcc? If not then its probably a useful patch. If yes,
then I'll get over it.

There are a few other patches required for FFI - since the command
line used by Hugs in the tree hasn't worked with visual studio
compilers for a long time - I'll commit some patches tonight.

With these tweaks, ffihugs works just great with windows. The only
thing potentially missing is a warning that your carefully written C
file is about to be trashed by ffihugs if you do the "obvious" thing.
Or perhaps hugs should use a different name for the file generates,
like test.temp.hugs.c ? Just anything thats less likely to clash.

Thanks

Neil

Attachment: windows_ffi.patch
Description: Binary data

_______________________________________________
Cvs-hugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-hugs

Reply via email to