diff options
author | Pauli Nieminen <[email protected]> | 2010-03-17 11:26:48 +0200 |
---|---|---|
committer | Pauli Nieminen <[email protected]> | 2010-03-17 11:26:48 +0200 |
commit | f0f04cd12db156ec53b7ea46fae27199af121f90 (patch) | |
tree | fdf67a4fd47d4b12eec75aac85496420ca95dbd6 /src/mesa/main | |
parent | e1ee3eaf6d739ddaa31bad1316e000c6220fa707 (diff) | |
parent | a29c7948d965ad274ae7ac98fe01f2f877b19d94 (diff) |
Merge branch '7.8' into master
Conflicts:
Makefile
src/mesa/main/version.h
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/imports.c | 12 | ||||
-rw-r--r-- | src/mesa/main/imports.h | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 56e8195810e..1ae08533648 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -795,18 +795,20 @@ _mesa_strdup( const char *s ) } } -/** Wrapper around strtod() */ -double -_mesa_strtod( const char *s, char **end ) +/** Wrapper around strtof() */ +float +_mesa_strtof( const char *s, char **end ) { #ifdef _GNU_SOURCE static locale_t loc = NULL; if (!loc) { loc = newlocale(LC_CTYPE_MASK, "C", NULL); } - return strtod_l(s, end, loc); + return strtof_l(s, end, loc); +#elif defined(_ISOC99_SOURCE) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) + return strtof(s, end); #else - return strtod(s, end); + return (float)strtod(s, end); #endif } diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index fb4a00eca7b..d28f4ad125d 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -575,8 +575,8 @@ _mesa_getenv( const char *var ); extern char * _mesa_strdup( const char *s ); -extern double -_mesa_strtod( const char *s, char **end ); +extern float +_mesa_strtof( const char *s, char **end ); extern unsigned int _mesa_str_checksum(const char *str); |