Re: [Vala] Conditional vapis

I think the solution is to write a windows-posix.vapi implementing the POSIX stuff that
is supported on w32 and then a windows.vapi for the w32-specific stuff.

We'll send those vapis when tested.

This way at compile time you just have to specify a different --pkg, but both implementing
the same Posix namespace. So the final app will need no modification.

Sorry for the noise :)

pancake wrote:
Talking about conditional vapis...

what do you think about including io.h and windows.h instead of unistd.h on posix.vapi when including this file on windows? I understand that this should be a check to be done in C and not at vala level because the generated C files should compile on linux
as well as on windows.

The problem I'm facing here is that GIO doesnt implement g_read g_write, ... because it relays on system's POSIX functions..which is weird. I opened a bug about it. but looks
like glib developers doesnt wants to add few #defines to fix that issue.

So, if I do something in vala that uses posix, the generated code is directly unusable
on Windows. which solution do you propose?

I dont see a clean/simple solution.. but i'm opened to ideas :)

Vala-list mailing list
Vala-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]