I need to use fopen for a library. Is this the correct approach? Is fopen already defined somewhere? (it would be useful in LibC IMO)
@[Link("c")]
lib LibStd
type File = Void*
fun fopen( LibC::Char*, LibC::Char* ): File
fun fclose( File )
end
It works fine, I would like to know the best way to define it.
Just a minor improvement that could be useful (this is the current solution that I'm using in my bindings):