[Vala] How to re-use external C function with pointer

2013-07-02 Thread Olivier Duchateau
Hi, I find this code in Vala program [1]. But under FreeBSD, prctl() doesn't exist. So I use setproctitle(3) [2] (see attachment), but I get this error message: /usr/ports/x11-toolkits/granite/work/granite-0.2/lib/Application.vala:95.67-95.6 7: error: syntax error, expected `)'

Re: [Vala] How to re-use external C function with pointer

2013-07-02 Thread tarnyko
Hi Olivier, Try it this way : protected extern static void setproctitle (string fmt); I seem to remember Vala doesn't treat the const keyword well in parenthises. Regards, Tarnyko Olivier Duchateau writes: Hi, I find this code in Vala program [1]. But under FreeBSD, prctl() doesn't