From: Mathieu Rene Date: Fri, 21 Jan 2011 16:53:20 +0000 (-0500) Subject: Tricky preprocessor... try again X-Git-Tag: v1.2-rc1~187^2~13^2~31^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c91b409caa37a115a46f60f7b3725d7dd1b3c50e;p=thirdparty%2Ffreeswitch.git Tricky preprocessor... try again --- diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c index 0b73c66b4f..377cfe520c 100644 --- a/src/mod/formats/mod_shout/mod_shout.c +++ b/src/mod/formats/mod_shout/mod_shout.c @@ -584,8 +584,11 @@ static void launch_write_stream_thread(shout_context_t *context) } #define TC_BUFFER_SIZE 1024 * 32 -#define STR(_x) #_x -#define MPGERROR() {err = "MPG123 Error at " __FILE__ ":" STR(__LINE__) "."; mpg123err = mpg123_strerror(context->mh); goto error; } + +#define CONCAT_LOCATION(_x,_y) _x ":" #_y +#define MAKE_LOCATION(_x,_y) CONCAT_LOCATION(_x,_y) +#define HERE MAKE_LOCATION(__FILE__, __LINE__) +#define MPGERROR() {err = "MPG123 Error at " HERE "."; mpg123err = mpg123_strerror(context->mh); goto error; } static switch_status_t shout_file_open(switch_file_handle_t *handle, const char *path) { shout_context_t *context;