From cad449ce4a6de420b36a155f9da8c575307c66a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Tue, 4 Nov 2003 14:38:26 +0000 Subject: Final patches for compiling xine under MSVC: - basename() is added to xine-utils, if it isn't found by configure - macros with variable number of arguments are simplified to ignore additional arguments (only for MSVC), lprintf macro simplified with full functionality - minor update for building a52, some preparation for ffmpeg CVS patchset: 5687 CVS date: 2003/11/04 14:38:26 --- src/xine-utils/xineutils.h | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) (limited to 'src/xine-utils/xineutils.h') diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index 6e4900b30..91e4e0d7a 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.62 2003/11/01 17:25:49 mroi Exp $ + * $Id: xineutils.h,v 1.63 2003/11/04 14:38:26 valtri Exp $ * */ #ifndef XINEUTILS_H @@ -33,6 +33,9 @@ extern "C" { #include #include #include +#if HAVE_LIBGEN_H +# include +#endif #ifdef XINE_COMPILE # include "attributes.h" @@ -907,24 +910,18 @@ void xine_print_trace(void); #endif /* LOG_VERBOSE */ #ifdef LOG - #ifdef __GNUC__ - #define lprintf(fmt, args...) \ - do{ \ - LONG_LOG_MODULE_STRING \ - printf( fmt, ##args ); \ - }while(0) - #else - #define lprintf(...) \ - do{ \ - LONG_LOG_MODULE_STRING \ - printf( __VA_ARGS__ ); \ - }while(0) - #endif /* __GNUC__ */ + #define lprintf \ + LONG_LOG_MODULE_STRING \ + printf #else #ifdef __GNUC__ #define lprintf(fmt, args...) ; + #else + #ifdef _MSC_VER + #define lprintf #else #define lprintf(...) ; + #endif /* _MSC_VER */ #endif /* __GNUC__ */ #endif /* LOG */ @@ -937,6 +934,15 @@ void xine_print_trace(void); } \ }while(0) #else +#ifdef _MSC_VER + #define llprintf(cat, fmtargs) \ + do{ \ + if(cat){ \ + LONG_LOG_MODULE_STRING \ + printf( "%s", fmtargs ); \ + } \ + }while(0) +#else #define llprintf(cat, ...) \ do{ \ if(cat){ \ @@ -944,6 +950,7 @@ void xine_print_trace(void); printf( __VA_ARGS__ ); \ } \ }while(0) +#endif /* _MSC_VER */ #endif /* __GNUC__ */ #ifdef __GNUC__ @@ -955,6 +962,15 @@ void xine_print_trace(void); } \ } while(0) #else +#ifdef _MSC_VER + #define xprintf(xine, verbose, fmtargs) \ + do { \ + if((xine)->verbosity >= verbose){ \ + LOG_MODULE_STRING \ + printf("%s", fmtargs); \ + } \ + } while(0) +#else #define xprintf(xine, verbose, ...) \ do { \ if((xine)->verbosity >= verbose){ \ @@ -962,6 +978,7 @@ void xine_print_trace(void); printf(__VA_ARGS__); \ } \ } while(0) +#endif /* _MSC_VER */ #endif /* __GNUC__ */ /* time measuring macros for profiling tasks */ -- cgit v1.2.3