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

Diego Biurrun <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <20141030105011.GB30310@nibbler>
On Thu, Oct 30, 2014 at 08:02:45AM +0100, Reimar Döffinger wrote:
> On 29.10.2014, at 21:33, Diego Biurrun <[email protected]> wrote:
> > --- 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.

Quite possibly, yes.  The current MSVC version is the first with sensible
C99 support, so it feels like a good version to require :)

j-b, do we care about old MSVC?

Diego
_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.