[libdvdcss-devel] [PATCH 28/47] Replace GCC-specific bits in print_debug macro by standards-compliant code.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Oct 30 08:02:45 CET 2014


On 29.10.2014, at 21:33, Diego Biurrun <diego at biurrun.de> wrote:
> ---
> src/libdvdcss.h | 18 ++----------------
> 1 file changed, 2 insertions(+), 16 deletions(-)
> 
> diff --git a/src/libdvdcss.h b/src/libdvdcss.h
> index 8ac0633..4f1f4af 100644
> --- a/src/libdvdcss.h
> +++ b/src/libdvdcss.h
> @@ -87,27 +87,13 @@ struct dvdcss_s
> /*****************************************************************************
>  * Functions used across the library
>  *****************************************************************************/
> -#if defined( _MSC_VER )
> -#include <stdarg.h>
> -__forceinline void print_debug(dvdcss_t dvdcss, const char *msg,...)
> -{
> -    va_list args;
> -
> -    fprintf( stderr, "libdvdcss debug: " );
> -    va_start( args, msg );
> -    vfprintf( stderr, msg, args );
> -    va_end( args );
> -    fprintf( stderr, "\n" );
> -}
> -#else
> -#define print_debug(dvdcss,msg,args...) \
> +#define print_debug( dvdcss, ... ) \
>     if( dvdcss->b_debug ) \
>     { \
>         fprintf( stderr, "libdvdcss debug: " ); \
> -        fprintf( stderr, msg, ##args ); \
> +        fprintf( stderr, __VA_ARGS__ ); \
>         fprintf( stderr, "\n" ); \

Probably nobody cares, but this most likely won't compile anymore on oldish MSVC versions.


More information about the libdvdcss-devel mailing list