[FFmpeg-devel] [PATCH] Re-add OS/2 support

Dave Yeo daveryeo
Thu Sep 13 05:46:21 CEST 2007


KO Myung-Hun wrote:
> Hi/2.
> 
> Diego Biurrun wrote:
>> On Sat, Sep 08, 2007 at 04:37:44PM +0900, KO Myung-Hun wrote:
>>   
>>> This patch re-add OS/2 support.
...
>>>
>>> @@ -1641,7 +1686,7 @@
>>>      temp_extralibs `"${SDL_CONFIG}" --libs`
>>> -    if check_lib SDL.h SDL_Init; then
>>> +    if check_lib2 SDL.h SDL_Init; then
>>>     
>> This looks wrong.
>>
>>   
> 
> check_lib() check header and function independently and assume function 
> type is 'int', but check_lib2() check function with given header. In 
> OS/2 port of SDL, the naming convention of SDL function is not a C 
> convention, preceded by '_'. But it is named as it is. That is, 
> 'SDL_Init' is 'SDL_Init' not '_SDL_Init'. So without 'SDL.h' linker find 
> '_SDL_Init', but lib has a 'SDL_Init'. After all, linker faile to link.
> 
> So I choosed check_lib2.
> 

As said this is a known issue with the OS/2 port of SDL. Problem is that 
SDL is built with the OpenWatcom compiler and as mentioned has no 
leading underscores in the exports. I usually work around this issue by 
adding an alias to the import library which is why I forgot all about 
this issue, had the alias already.
I understand that another fix is to assume the function type is 
int_System but KO's fix looks the simplest.
There is a FAQ on OS/2 calling conventions at 
http://svn.netlabs.org/libc/wiki/Faq#Callingconventions.
Dave




More information about the ffmpeg-devel mailing list