From b8bfb947158d5e5583d6d2854c62347e265071ac Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Tue, 10 Apr 2007 18:00:59 +0000 Subject: [PATCH] work around __FILE__ being defined as absolute path --- zypp/base/Logger.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zypp/base/Logger.h b/zypp/base/Logger.h index f5f15f0..5e52987 100644 --- a/zypp/base/Logger.h +++ b/zypp/base/Logger.h @@ -59,9 +59,11 @@ #define _INT(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_INT ) #define _USR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_USR ) +#define _BASEFILE ( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ ) + /** Actual call to @ref getStream. */ #define ZYPP_BASE_LOGGER_LOG(GROUP,LEVEL) \ - zypp::base::logger::getStream( GROUP, LEVEL, __FILE__, __FUNCTION__, __LINE__ ) + zypp::base::logger::getStream( GROUP, LEVEL, _BASEFILE, __FUNCTION__, __LINE__ ) /*@}*/ -- 2.7.4