%config=(%origconfig);
}
+our $program_to_wrap = $0;
sub gen_wrapper () {
$config{srcdir}=File::Spec->rel2abs($config{srcdir});
$config{destdir}=File::Spec->rel2abs($config{destdir});
- my $this=File::Spec->rel2abs($0);
+ my $this=File::Spec->rel2abs($program_to_wrap);
if (! -x $this) {
error(sprintf(gettext("%s doesn't seem to be executable"), $this));
}
newenviron[i++]=s;
}
-set_cgilock_fd (int lockfd) {
+void set_cgilock_fd (int lockfd) {
char *fd_s=malloc(8);
sprintf(fd_s, "%i", lockfd);
setenv("IKIWIKI_CGILOCK_FD", fd_s, 1);