From fb6f1fa2b2d7c1ce61b782db6d62e32ad9fcac12 Mon Sep 17 00:00:00 2001 From: Yannick Brosseau Date: Fri, 13 Jan 2012 10:23:49 -0500 Subject: [PATCH] Remove stringify and add quotes directly in the configure 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 Signed-off-by: David Goulet --- 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 716e97865..9abc477c5 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 55fd5e7bf..f7cd81027 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 7bcd1a87e..e20ec4e9e 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); -- 2.34.1