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



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 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 `)'
            protected extern static void setproctitle (const char *fmt);
                                                                  ^
Compilation failed: 1 error(s), 0 warning(s)
*** Error code 1
[1] http://bazaar.launchpad.net/~elementary-pantheon/granite/0.2/view/head:/lib/Application.vala#L70
[2] http://www.freebsd.org/cgi/man.cgi?query=setproctitle&sektion=3&apropos=0&manpath=FreeBSD+9.1-RELEASE
--
olivier


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