From: Ian R. <id...@fr...> - 2010-03-12 23:45:17
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Gonsolo wrote: > diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c > index 56e8195..d77b36c 100644 > --- a/src/mesa/main/imports.c > +++ b/src/mesa/main/imports.c > @@ -810,6 +810,13 @@ _mesa_strtod( const char *s, char **end ) > #endif > } > > +/** Wrapper around strtof() */ > +float > +_mesa_strtof( const char *s, char **end ) > +{ > + return strtof(s, end); > +} > + We can't use strtof for the same reason we can't (directly) use strtod. It uses the locale, so that can make it parse numbers incorrectly. All of the users of _mesa_strtod actually want _mesa_strtof, so the right fix is to change the existing _mesa_strtod to _mesa_strtof. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkua0dEACgkQX1gOwKyEAw9kNgCffpzl4Zxk2JjOwAjIhR2gpiEp Y8IAoIs8IjQdhm7RdOmmYqWk/RylSmYK =0Ep5 -----END PGP SIGNATURE----- |