[lttng-dev] [lttng-tool PATCH] Remove stringify and add quotes directly in the configure
Yannick Brosseau
yannick.brosseau at gmail.com
Fri Jan 13 10:23:49 EST 2012
Some part of the path where the same as some defined variable and
the resulting string conversion gave the wrong result.
Remove the whole stringify function, since its use can be misleading
Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
---
configure.ac | 8 ++++----
lttng-sessiond/main.c | 12 ++++--------
lttng-sessiond/utils.h | 5 -----
3 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6bddf87..a9917dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,10 +42,10 @@ AC_ARG_WITH([consumer64d-libdir],
[CONSUMERD64_LIBDIR=''])
AC_SUBST([CONSUMERD64_LIBDIR])
-AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_BIN], $CONSUMERD32_BIN, [Location of the 32-bit consumerd executable.])
-AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_BIN], $CONSUMERD64_BIN, [Location of the 64-bit consumerd executable])
-AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_LIBDIR], $CONSUMERD32_LIBDIR, [Search for consumerd 32-bit libraries in this location.])
-AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_LIBDIR], $CONSUMERD64_LIBDIR, [Search for consumerd 64-bit libraries in this location.])
+AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_BIN], "$CONSUMERD32_BIN", [Location of the 32-bit consumerd executable.])
+AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_BIN], "$CONSUMERD64_BIN", [Location of the 64-bit consumerd executable])
+AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_LIBDIR], "$CONSUMERD32_LIBDIR", [Search for consumerd 32-bit libraries in this location.])
+AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_LIBDIR], "$CONSUMERD64_LIBDIR", [Search for consumerd 64-bit libraries in this location.])
# Check for pthread
AC_CHECK_LIB([pthread], [pthread_create], [],
diff --git a/lttng-sessiond/main.c b/lttng-sessiond/main.c
index f5f8dbe..a4788f7 100644
--- a/lttng-sessiond/main.c
+++ b/lttng-sessiond/main.c
@@ -174,14 +174,10 @@ static struct ltt_session_list *session_list_ptr;
int ust_consumerd64_fd = -1;
int ust_consumerd32_fd = -1;
-static const char *consumerd32_bin =
- __stringify(CONFIG_CONSUMERD32_BIN);
-static const char *consumerd64_bin =
- __stringify(CONFIG_CONSUMERD64_BIN);
-static const char *consumerd32_libdir =
- __stringify(CONFIG_CONSUMERD32_LIBDIR);
-static const char *consumerd64_libdir =
- __stringify(CONFIG_CONSUMERD64_LIBDIR);
+static const char *consumerd32_bin = CONFIG_CONSUMERD32_BIN;
+static const char *consumerd64_bin = CONFIG_CONSUMERD64_BIN;
+static const char *consumerd32_libdir = CONFIG_CONSUMERD32_LIBDIR;
+static const char *consumerd64_libdir = CONFIG_CONSUMERD64_LIBDIR;
static
void setup_consumerd_path(void)
diff --git a/lttng-sessiond/utils.h b/lttng-sessiond/utils.h
index 7bcd1a8..e20ec4e 100644
--- a/lttng-sessiond/utils.h
+++ b/lttng-sessiond/utils.h
@@ -18,11 +18,6 @@
#ifndef _LTT_UTILS_H
#define _LTT_UTILS_H
-#ifndef __stringify
-#define __stringify1(x) #x
-#define __stringify(x) __stringify1(x)
-#endif
-
const char *get_home_dir(void);
int notify_thread_pipe(int wpipe);
--
1.7.8.2
More information about the lttng-dev
mailing list