http://bugs.winehq.org/show_bug.cgi?id=10401
--- Comment #3 from Eric Mullins emwine@earthlink.net 2008-03-19 11:34:05 --- I discovered that using -mno-cygwin flag means "don't use any cygwin, use Microsoft runtime (MinGW)" and verified this by compiling the testcase using just the MinGW tools and getting the same sscanf() problem. I can also duplicate the issue by compiling the testcase as follows:
cl /MD wbtest.c -o wbtest.exe user32.lib
using Visual C++ 6.0, so the problematic sscanf() code appears to be in the MSVCRT.
Note: using Visual C++ 6.0 and compiling without "/MD" produces a binary that works fine in both windows and Wine, eg:
cl wbtest.c -o wbtest.exe user32.lib
From "cl -help":
/MD link with MSVCRT.LIB