foreach my $var (@envsave) {
$envsave.=<<"EOF"
if ((s=getenv("$var")))
- asprintf(&newenviron[i++], "%s=%s", "$var", s);
+ addenv("$var", s);
EOF
}
if ($config{rcs} eq "svn" && $config{notify}) {
# $2 in REV in the environment.
$envsave.=<<"EOF"
if (argc == 3)
- asprintf(&newenviron[i++], "REV=%s", argv[2]);
+ addenv("REV", argv[2]);
else if ((s=getenv("REV")))
- asprintf(&newenviron[i++], "%s=%s", "REV", s);
+ addenv("REV", s);
EOF
}
if ($config{rcs} eq "tla" && $config{notify}) {
$envsave.=<<"EOF"
if ((s=getenv("ARCH_VERSION")))
- asprintf(&newenviron[i++], "%s=%s", "ARCH_VERSION", s);
+ addenv("ARCH_VERSION", s);
EOF
}
open(OUT, ">$wrapper.c") || error(sprintf(gettext("failed to write %s: %s"), "$wrapper.c", $!));;
print OUT <<"EOF";
/* A wrapper for ikiwiki, can be safely made suid. */
-#define _GNU_SOURCE
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
extern char **environ;
+char *newenviron[$#envsave+5];
+int i=0;
+
+addenv(char *var, char *val) {
+ char *s=malloc(strlen(var)+1+strlen(val)+1);
+ if (!s)
+ perror("malloc");
+ sprintf(s, "%s=%s", var, val);
+ newenviron[i++]=s;
+}
int main (int argc, char **argv) {
/* Sanitize environment. */
char *s;
- char *newenviron[$#envsave+5];
- int i=0;
$envsave
newenviron[i++]="HOME=$ENV{HOME}";
newenviron[i++]="WRAPPED_OPTIONS=$configstring";
}
execl("$this", "$this", NULL);
- perror("failed to run $this");
+ perror("exec $this");
exit(1);
}
EOF
* Make the toc plugin use html-compatible anchors. This is necessary since
most web sites serve ikiwiki xhtml files as text/html and mozilla browsers
- get confused. So it's best for ikiwiki to follow the compatability
+ get confused. So it's best for ikiwiki to follow the compatability
recommendations in appendix C of the XHTML spec. Closes: #432045
+ * Support building on systems that lack asprintf.
+ * mercurial getctime is currently broken, apparently by some change in
+ mercurial version 0.9.4. Turn the failing test case into a TODO test case.
- -- Joey Hess <joeyh@debian.org> Sun, 08 Jul 2007 12:54:55 -0400
+ -- Joey Hess <joeyh@debian.org> Sun, 08 Jul 2007 20:25:00 -0400
ikiwiki (2.3) unstable; urgency=low
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-29 20:49-0400\n"
+"POT-Creation-Date: 2007-07-08 20:26-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr ""
#. translators: The parameter is a C filename.
-#: ../IkiWiki/Wrapper.pm:100
+#: ../IkiWiki/Wrapper.pm:107
#, perl-format
msgid "failed to compile %s"
msgstr ""
#. translators: The parameter is a filename.
-#: ../IkiWiki/Wrapper.pm:108
+#: ../IkiWiki/Wrapper.pm:115
#, perl-format
msgid "successfully generated %s"
msgstr ""