lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
***BOGO*** Re: [Mingw-users] strtod is not C99-compatible
- Date: Mon, 05 May 2008 14:52:03 +0100
- From: Ramiro Polla <ramiro@xxxxxxxxxxxxx>
- Subject: ***BOGO*** Re: [Mingw-users] strtod is not C99-compatible
Hello,
Danny Smith wrote:
>> Committed to CVS, will be included in the next release.
>
> +_CRTIMP double __cdecl __MINGW_NOTHROW _strtod (const char*, char**);
>
> Does MSVCRT.dll export this name?
No, it doesn't. I reopened the issue on the patch tracker and sent a new
patch to reflect this.
> MSDN documents strtod and wcstod as ANSI (presumably
> meaning ISO C90) compliant.
With the patch I sent, you can see the difference:
ramiro@FOUND /usrc/smalls
$ cat strtod.c
#include <stdlib.h>
#include <stdio.h>
int main()
{
char *string = "0x00000001";
char *end;
double d;
d = strtod(string, &end);
printf("end %s\n", end);
printf("%f\n", d);
return 0;
}
ramiro@FOUND /usrc/smalls
$ gcc -o strtod.exe strtod.c
ramiro@FOUND /usrc/smalls
$ ./strtod.exe
end
1.000000
ramiro@FOUND /usrc/smalls
$ gcc -D__NO_ISOCEXT -o strtod.exe strtod.c
ramiro@FOUND /usrc/smalls
$ ./strtod.exe
end x00000001
0.000000
Sorry for yet another wrong patch (I should be more careful).
Ramiro Polla
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users