[MPlayer-dev-eng] [PATCH] Win32 loader support for OS/2

Diego Biurrun diego at biurrun.de
Tue Feb 9 11:19:42 CET 2010


On Mon, Feb 08, 2010 at 11:18:44PM +0900, KO Myung-Hun wrote:
> Diego Biurrun wrote:
>> On Mon, Feb 08, 2010 at 09:37:01PM +0900, KO Myung-Hun wrote:
>>> Diego Biurrun wrote:
>>>> On Fri, Feb 05, 2010 at 08:53:25PM +0900, KO Myung-Hun wrote:
>>>>> This patch adds Win32 loader support for OS/2.
>>>>>
>>>>> --- loader/module.c	(revision 30512)
>>>>> +++ loader/module.c	(working copy)
>>>>> @@ -744,6 +744,50 @@
>>>>>
>>>>> +#ifdef __OS2__
>>>>> +uint32_t _System DosQueryMem(void *, uint32_t *, uint32_t *);
>>>>
>>>> Aren't you simply missing a header #include?
>>>
>>> It causes type clash between OS/2 and wine.
>>
>> Elaborate please.  It still sounds like there is a better solution.
>
> Ok. Seeing is believing.

Yes :-)

> I attach the error messages.
>
> gcc -MM -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 -march=i486 -mtune=generic -pipe -ffast-math -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -I.   -I/usr/include/freetype2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   loader/module.c | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," > loader/module.d
> gcc -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 -march=i486 -mtune=generic -pipe -ffast-math -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -I.   -I/usr/include/freetype2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -c -o loader/module.o loader/module.c
> In file included from loader/module.c:34:
> loader/wine/windef.h:115:1: warning: "_stdcall" redefined
> <built-in>: warning: this is the location of the previous definition
> loader/wine/windef.h:116:1: warning: "_fastcall" redefined
> <built-in>: warning: this is the location of the previous definition
> loader/wine/windef.h:117:1: warning: "__fastcall" redefined
> <built-in>: warning: this is the location of the previous definition
> loader/wine/windef.h:124:1: warning: "_cdecl" redefined
> <built-in>: warning: this is the location of the previous definition
> loader/wine/windef.h:130:1: warning: "__declspec" redefined
> <built-in>: warning: this is the location of the previous definition

This sounds like you should adapt the #ifdefs in loader/wine/windef.h.

> In file included from f:/lang/gcc/usr/include/os2.h:35,
>                  from loader/module.c:750:
> f:/lang/gcc/usr/include/os2emx.h: At top level:
> f:/lang/gcc/usr/include/os2emx.h:299: error: conflicting types for 'HQUEUE'
> loader/wine/windef.h:280: note: previous declaration of 'HQUEUE' was here
> f:/lang/gcc/usr/include/os2emx.h:300: error: conflicting types for 'PHQUEUE'
> loader/wine/windef.h:280: note: previous declaration of 'PHQUEUE' was here
> f:/lang/gcc/usr/include/os2emx.h:302: error: conflicting types for 'HMODULE'
> loader/wine/windef.h:296: note: previous declaration of 'HMODULE' was here
> f:/lang/gcc/usr/include/os2emx.h:1461: error: conflicting types for 'HFILE'
> loader/wine/windef.h:264: note: previous declaration of 'HFILE' was here
> f:/lang/gcc/usr/include/os2emx.h:1462: error: conflicting types for 'PHFILE'
> loader/wine/windef.h:264: note: previous declaration of 'PHFILE' was here

ouch..

> loader/module.c: In function 'report_func':
> loader/module.c:896: error: expected expression before 'printf'
> loader/module.c: At top level:
> loader/module.c:1052: error: conflicting types for 'MODULE_GetProcAddress'
> loader/wine/module.h:142: note: previous declaration of 'MODULE_GetProcAddress' was here
> loader/module.c: In function 'MODULE_GetProcAddress':
> loader/module.c:1089: error: a label can only be part of a statement and a declaration is not a statement
> loader/module.c:1089: error: expected identifier or '(' before string constant

The declarations are exactly the same so there must be some trouble
with different header #includes.

Diego



More information about the MPlayer-dev-eng mailing list