msvcrt: scanf fix a typo
Austin English
austinenglish at gmail.com
Mon Sep 22 15:05:52 CDT 2008
On Mon, Sep 22, 2008 at 5:27 AM, Francois Gouget <fgouget at free.fr> wrote:
> On Sat, 20 Sep 2008, Michael Karcher wrote:
> [...]
>> Looks like we need to compile with -fno-builtin-sscanf, because gcc
>> knows the implementation of glibc's sscanf, and you explicitly have to
>> forbid it to use this knowledge which does not apply perfectly to
>> Microsofts sscanf. This (of course) is only applicable to those parts of
>> wine that link to msvcrt and thus use msvcrt's scanf implementation.
>
> Just mentioning an alternative approach in case the -fno-builtin-*
> approach does not pan out: maybe we can fool gcc by doing something like
> this:
>
> char buf[3];
> strcpy(buf, "%P");
> ok( sscanf("1234", buf, &ptr) == 1, "sscanf failed\n" );
>
>
> --
> Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
> tcA thgirypoC muinelliM latigiD eht detaloiv tsuj evah uoY
>
>
>
The fix Alexandre committed
(http://source.winehq.org/git/wine.git/?a=commitdiff;h=6538cb44e371bcd3a821227ffc40624de5da1ead)
fixed it for me (gcc version 3.4.6).
-Austin
More information about the wine-devel
mailing list