re: msvcrt: scanf fix a typo

2008-09-22 Thread Francois Gouget
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

Re: msvcrt: scanf fix a typo

2008-09-22 Thread Austin English
On Mon, Sep 22, 2008 at 5:27 AM, Francois Gouget [EMAIL PROTECTED] 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

Re: msvcrt: scanf fix a typo

2008-09-21 Thread Alexandre Julliard
Michael Karcher [EMAIL PROTECTED] writes: OK. Thanks for the pointer. I have a configure test ready that checks whether the global -fno-builtin is really needed., and uses separate flags otherwise. I am planning to submit it in series with a second patch that checks for whether

Re: msvcrt: scanf fix a typo

2008-09-21 Thread Michael Karcher
Am Sonntag, den 21.09.2008, 11:25 +0200 schrieb Alexandre Julliard: Michael Karcher [EMAIL PROTECTED] writes: OK. Thanks for the pointer. I have a configure test ready that checks whether the global -fno-builtin is really needed., and uses separate flags otherwise. I am planning to submit

Re: msvcrt: scanf fix a typo

2008-09-21 Thread Michael Karcher
Am Sonntag, den 21.09.2008, 13:07 +0200 schrieb Alexandre Julliard: Michael Karcher [EMAIL PROTECTED] writes: Sure I can, this was approach b I suggested. But that may be harmful to performance, as it forbids gcc to use any knowledge about the standard library (includes inlining of memcpy

Re: msvcrt: scanf fix a typo

2008-09-21 Thread Alexandre Julliard
Michael Karcher [EMAIL PROTECTED] writes: Am Sonntag, den 21.09.2008, 13:07 +0200 schrieb Alexandre Julliard: If performance is an issue you most likely don't want to use msvcrt at all, native Unix libc will always be faster. And knowing MS, they are capable of adding an exception handler in

Re: msvcrt: scanf fix a typo

2008-09-21 Thread Michael Karcher
Am Sonntag, den 21.09.2008, 13:46 +0200 schrieb Alexandre Julliard: Michael Karcher [EMAIL PROTECTED] writes: Am Sonntag, den 21.09.2008, 13:07 +0200 schrieb Alexandre Julliard: If performance is an issue you most likely don't want to use msvcrt at all, native Unix libc will always be

Re: msvcrt: scanf fix a typo

2008-09-21 Thread Alexandre Julliard
Michael Karcher [EMAIL PROTECTED] writes: Sorry, I didn't manage to write what I mean. The only dll modules in the wine tree that currently use @BUILTINFLAG@ (and include msvcrt headers) are the two I listed. And after examing the little amount of C code they contain, I see no problem to

Re: msvcrt: scanf fix a typo

2008-09-21 Thread David Laight
On Fri, Sep 19, 2008 at 03:51:00PM -0700, Dan Kegel wrote: Here's the gcc error: scanf.c:66: warning: unknown conversion type character `P' in format I'm not a programmer, but I play one on TV. And here's what I came up with in five minutes of typing and not enough thinking: That

re: msvcrt: scanf fix a typo

2008-09-20 Thread Michael Karcher
Am Freitag, den 19.09.2008, 15:51 -0700 schrieb Dan Kegel: Here's the gcc error: scanf.c:66: warning: unknown conversion type character `P' in format That particular error depends on gcc knowing intimate details of sscanf. Unless we teach gcc about the particular sscanf we're implementing,

re: msvcrt: scanf fix a typo

2008-09-20 Thread Michael Karcher
Am Samstag, den 20.09.2008, 10:50 +0200 schrieb Michael Karcher: Looks like we need to compile with -fno-builtin-sscanf, because gcc knows the implementation of glibc's sscanf, OK, I looked further into it. On Linux, we don't get the warning, because gcc is called with the sledgehammer option

Re: msvcrt: scanf fix a typo

2008-09-20 Thread Alexandre Julliard
Michael Karcher [EMAIL PROTECTED] writes: On the other hand, for the implementation side (msvcrtd and crtdll), option c seems attractive to me, because it just disables the stuff we need disabled but allows gcc to take full advantage about knowing the C standard on functions where msvcrt is

Re: msvcrt: scanf fix a typo

2008-09-20 Thread Peter Oberndorfer
On Samstag 20 September 2008, Paul Vriens wrote: James Hawkins wrote: On Fri, Sep 19, 2008 at 4:59 PM, Austin English [EMAIL PROTECTED] wrote: Relevant code: /* check %p with no hex digits */ ok( sscanf(1233, %p, ptr) == 1, sscanf failed\n ); ok( ptr == (void *)0x1233,sscanf

Re: msvcrt: scanf fix a typo

2008-09-20 Thread Michael Karcher
Am Samstag, den 20.09.2008, 12:17 +0200 schrieb Alexandre Julliard: The real problem is that the -fno-builtin-xxx option is broken on some gcc versions. We used to use it, but we had to switch to a global -fno-builtin because of this bug. OK. Thanks for the pointer. I have a configure test

Re: msvcrt: scanf fix a typo

2008-09-19 Thread James Hawkins
On Fri, Sep 19, 2008 at 4:39 PM, Austin English [EMAIL PROTECTED] wrote: Found using -Werror (strangely, didn't occur on ubuntu, but does on PC-BSD)...Must be the gcc version. @@ -63,7 +63,7 @@ static void test_sscanf( void ) ok( sscanf(1233, %p, ptr) == 1, sscanf failed\n ); ok(

Re: msvcrt: scanf fix a typo

2008-09-19 Thread Austin English
On Fri, Sep 19, 2008 at 4:51 PM, James Hawkins [EMAIL PROTECTED] wrote: On Fri, Sep 19, 2008 at 4:39 PM, Austin English [EMAIL PROTECTED] wrote: Found using -Werror (strangely, didn't occur on ubuntu, but does on PC-BSD)...Must be the gcc version. @@ -63,7 +63,7 @@ static void test_sscanf(

Re: msvcrt: scanf fix a typo

2008-09-19 Thread James Hawkins
On Fri, Sep 19, 2008 at 4:59 PM, Austin English [EMAIL PROTECTED] wrote: Relevant code: /* check %p with no hex digits */ ok( sscanf(1233, %p, ptr) == 1, sscanf failed\n ); ok( ptr == (void *)0x1233,sscanf reads %p instead of %x\n, ptr, 0x1233 ); ok( sscanf(1234, %P, ptr) == 1,

Re: msvcrt: scanf fix a typo

2008-09-19 Thread Juan Lang
Relevant code: /* check %p with no hex digits */ ok( sscanf(1233, %p, ptr) == 1, sscanf failed\n ); ok( ptr == (void *)0x1233,sscanf reads %p instead of %x\n, ptr, 0x1233 ); ok( sscanf(1234, %P, ptr) == 1, sscanf failed\n ); ok( ptr == (void *)0x1234,sscanf reads %p instead

Re: msvcrt: scanf fix a typo

2008-09-19 Thread Paul Vriens
James Hawkins wrote: On Fri, Sep 19, 2008 at 4:59 PM, Austin English [EMAIL PROTECTED] wrote: Relevant code: /* check %p with no hex digits */ ok( sscanf(1233, %p, ptr) == 1, sscanf failed\n ); ok( ptr == (void *)0x1233,sscanf reads %p instead of %x\n, ptr, 0x1233 ); ok(

Re: msvcrt: scanf fix a typo

2008-09-19 Thread Austin English
On Fri, Sep 19, 2008 at 6:14 PM, Paul Vriens [EMAIL PROTECTED] wrote: James Hawkins wrote: On Fri, Sep 19, 2008 at 4:59 PM, Austin English [EMAIL PROTECTED] wrote: Relevant code: /* check %p with no hex digits */ ok( sscanf(1233, %p, ptr) == 1, sscanf failed\n ); ok( ptr == (void

re: msvcrt: scanf fix a typo

2008-09-19 Thread Dan Kegel
Here's the gcc error: scanf.c:66: warning: unknown conversion type character `P' in format I'm not a programmer, but I play one on TV. And here's what I came up with in five minutes of typing and not enough thinking: That particular error depends on gcc knowing intimate details of sscanf.

Re: msvcrt: scanf fix a typo

2008-09-19 Thread Austin English
On Fri, Sep 19, 2008 at 5:51 PM, Dan Kegel [EMAIL PROTECTED] wrote: Here's the gcc error: scanf.c:66: warning: unknown conversion type character `P' in format I'm not a programmer, but I play one on TV. And here's what I came up with in five minutes of typing and not enough thinking: That