[Vala] Conditional vapis



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.

 https://bugzilla.gnome.org/show_bug.cgi?id=603473

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 :)

--pancake



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