[vlc-devel] Symbian VLC Merge changes to src

Rémi Denis-Courmont remi at remlab.net
Sat Jul 31 20:06:39 CEST 2010


Le samedi 31 juillet 2010 14:57:53 Pankaj yadav, vous avez écrit :
> On 7/31/10, Rémi Denis-Courmont <remi at remlab.net> wrote:
> > diff --git a/src/control/core.c b/src/control/core.c
> > index 942212d..59d98cd 100644
> > --- a/src/control/core.c
> > +++ b/src/control/core.c
> > @@ -48,14 +48,24 @@ libvlc_instance_t * libvlc_new( int argc, const char
> > *const *argv )
> > 
> >      const char *my_argv[argc + 2];
> >      my_argv[0] = "libvlc"; /* dummy arg0, skipped by getopt() et al */
> >      for( int i = 0; i < argc; i++ )
> > 
> > -         my_argv[i + 1] = argv[i];
> > +
> > +#ifndef __WINSCW__
> > +    my_argv[i + 1] = argv[i];
> > +#else
> > +    my_argv[i + 1] = (char *) argv[i];
> > +#endif
> > +
> > 
> > I still don't understand why you need that cast.
> 
> Because WINSCW compiler is so stupid that it says "Illegal implicit
> conversion from char * to const char *"...Where as GCCE works well
> with the code being as it is.So I need all these hacks.

C code converts from char * to const char * all over the place, in VLC and 
everywhere else. ifdef or explicitly cast for BROKEN compilers are a total non 
starter, especially for something as stupid and as frequent as this case.

> > */
> > -#ifdef HAVE_ATTRIBUTE_PACKED
> > +#if defined(HAVE_ATTRIBUTE_PACKED) && !defined(__WINSCW__)
> > 
> > This is counter-sensical. If you don't have attribute packed, then you
> > don't have attribute packed.
> 
> Same Reason, I have to define HAVE_ATTRIBUTE PACKED as GCCE allows
> where as WINSCW doesnot.

Let me put it a third time more explicitly: You MUST NOT define 
HAVE_ATTRIBUTE_PACKED if you do not support the packed attribute. I don't want 
such non-sense in the code base.

> I dont know how to give command line parameters while dubugging
> symbian binaries.So to have verbose messages I have disable filtering
> temporarily.

Debug hacks don't belong in the official source code.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list