msvcrt: scanf fix a typo

Francois Gouget fgouget at free.fr
Mon Sep 22 05:27:00 CDT 2008


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



More information about the wine-devel mailing list