[MPlayer-cvslog] r31410 - in trunk/loader/qtx: list.c qtxload.c
diego at biurrun.de
Mon Jul 5 20:34:55 CEST 2010
On Tue, Jun 15, 2010 at 09:01:23PM +0200, Reimar Döffinger wrote:
> On Tue, Jun 15, 2010 at 12:05:00PM +0200, Attila Kinali wrote:
> > On Mon, 14 Jun 2010 21:05:26 +0200
> > Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> > > On Mon, Jun 14, 2010 at 01:45:33PM +0200, diego wrote:
> > > >
> > > > Log:
> > > > Replace forward declarations by loader/wine/winbase.h #include.
> > >
> > > Luckily it seems to work in this case, but the reason for that
> > > kind of thing is that some of this code actually does not use
> > > the loader/wine stuff but the Windows loader, and using those
> > > includes can lead to conflicts between the Windows and the wine
> > > headers.
> > I dont really get what you mean here. Do you mean that the code
> > in question is a hack? Or that this commit is wrong because of
> > the use of non-wine function under some conditions?
> I mean:
> A lot of code when compiled for MinGW includes windows.h
> If windows.h and something from loader/wine/* is included at
> the same time, compilation errors often result.
> Thus, for any code that is also compiled when compiling for
> MinGW you have to be careful about including things from
> loader/wine because it might break compilation.
> Also, being pedantic, when this code is compiled on MinGW it
> would be slightly better if the declarations from the
> Windows headers were used instead the wine ones.
> But as said, it is fine, I just wanted to point out that
> using the loader/wine/* headers can be quite tricky.
So what is the correct solution for vd_realvid.c and similar files?
Currently they use a bunch of forward declarations for stuff that is
declared in loader/wine/winbase.h (LoadLibraryA, GetProcAddress,
FreeLibrary, GetModuleHandleA), but the signature appears to be
somewhat incompatible. If I replace the forward declarations by
the #include the result are a ton of warnings like
libmpcodecs/vd_realvid.c: In function 'load_syms_windows':
libmpcodecs/vd_realvid.c:184: warning: assignment makes pointer from integer without a cast
libmpcodecs/vd_realvid.c:191: warning: passing argument 1 of 'GetProcAddress' makes integer from pointer without a cast
libmpcodecs/vd_realvid.c:191: warning: assignment from incompatible pointer type
More information about the MPlayer-cvslog