[systemd-commits] 2 commits - configure.ac src/shared
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Tue Apr 16 21:41:32 PDT 2013
configure.ac | 6 +++---
src/shared/fileio.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit ac714a78fdca481488d88f84b6332d28083a4511
Author: Martin Jansa <martin.jansa at gmail.com>
Date: Tue Apr 16 14:26:30 2013 +0200
configure: use AC_CHECK_TOOL for objcopy, strings and gperf
* using AC_PATH_TOOL does not allow to override it from shell environment
which is useful when cross-compiling
* with external toolchain I have different HOST_PREFIX and HOST_SYS
AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
which is available only as ${TARGET_PREFIX}-objcopy then it tries
objcopy without prefix which is found on host, but that objcopy
does not work for !host (e.g. arm when building on x86) libs
diff --git a/configure.ac b/configure.ac
index 33b0ca9..519f1a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,9 +86,9 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1])
AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
enable_introspection=no])
-AC_PATH_TOOL(OBJCOPY, objcopy)
-AC_PATH_TOOL(STRINGS, strings)
-AC_PATH_TOOL(GPERF, gperf)
+AC_CHECK_TOOL(OBJCOPY, objcopy)
+AC_CHECK_TOOL(STRINGS, strings)
+AC_CHECK_TOOL(GPERF, gperf)
if test -z "$GPERF" ; then
AC_MSG_ERROR([*** gperf not found])
fi
commit ced2d10a28cff3bab6fb613652db5abde8ed940e
Author: Mantas MikulÄnas <grawity at gmail.com>
Date: Sun Apr 14 14:54:09 2013 +0300
fileio: also escape $ and ` when writing out env vars
These are also considered special by sh and bash.
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index 400a416..617afea 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -529,11 +529,11 @@ static void write_env_var(FILE *f, const char *v) {
p++;
fwrite(v, 1, p-v, f);
- if (string_has_cc(p) || chars_intersect(p, WHITESPACE "\'\"\\")) {
+ if (string_has_cc(p) || chars_intersect(p, WHITESPACE "\'\"\\`$")) {
fputc('\"', f);
for (; *p; p++) {
- if (strchr("\'\"\\", *p))
+ if (strchr("\'\"\\`$", *p))
fputc('\\', f);
fputc(*p, f);
More information about the systemd-commits
mailing list