[MPlayer-dev-eng] A patch for stdcall and cygwin

Dragan Milenkovic tyrant at galeb.etf.bg.ac.yu
Thu May 23 22:10:04 CEST 2002


Hello,

I have just compiled mencoder for cygwin. Even though this was a very
distasteful thing, I had to do it... (linux admin limits my cpu-time).
The patch that made it work is attached to this message.

Apparently, dct64_MMX, k7 and 3dnow functions written in assembler
have different declarations and definitions (stdcall vs. cdecl). It
doesn't matter on linux, but on windoze they get different name
mangling which prevents it from linking.

There was a hack that made it possible to link, but the resulting
program could not use the optimized code (signal 11). It changed the
definition from stdcall to cdecl. Since those functions are called
from within another assembler function, the compiler can never detect
the error, but produces the wrong call/return code.

Of what importance is it for linux? If someone was to use those
functions with C code, the declaration and definition must match.
Otherwise, on linux it would link but will seg-fault.

Oh yeah... I didn't mention... now it works... on to some encoding...

-- 
Dragan Milenkovic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MPlayer-0.90pre4-stdcall-cygwin.diff.gz
Type: application/octet-stream
Size: 740 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020523/1510eb5c/attachment.obj>


More information about the MPlayer-dev-eng mailing list