From e9c0122ec043e57f6c23577474c7afb1f8cad79b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen <corinna@vinschen.de> Date: Mon, 10 Jun 2013 15:27:43 +0000 Subject: * libc/stdlib/gdtoa-gethex.c (__hexdig): Constify. (hexdig_init): Remove. (__hexdig_fun): New function. hexdig_init, added __hexdig_fun (gethex): Call __get_hexdig macro rather than hexdig. * libc/stdlib/gdtoa-hexnan.c (hexnan): Constify fpi argument. Call __get_hexdig macro rather than hexdig. * libc/stdlib/ldtoa.c: Throughout constify functions arguments where required by constifying the following arrays. (ezero): Constify. (eone): Constify. (ermsg): Constify. (etens): Constify. (emtens): Constify. (nan113): Constify. (nan64): Constify. (nan53): Constify. (nan24): Constify. * libc/stdlib/mprec.h (__get_hexdig): Define. (gethex): Constify args in declaration where appropriate. (hexnan): Ditto. (hexdig_init): Remove declaration. (__hexdig_fun): Declare. * libc/stdlib/strtod.c (fpi): Constify. (fpinan): Constify. --- newlib/libc/stdlib/strtod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'newlib/libc/stdlib/strtod.c') diff --git a/newlib/libc/stdlib/strtod.c b/newlib/libc/stdlib/strtod.c index 159c969..ee33960 100644 --- a/newlib/libc/stdlib/strtod.c +++ b/newlib/libc/stdlib/strtod.c @@ -287,7 +287,7 @@ _DEFUN (_strtod_r, (ptr, s00, se), if (*s == '0') { #ifndef NO_HEX_FP { - static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI }; + static _CONST FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI }; Long exp; __ULong bits[2]; switch(s[1]) { @@ -415,7 +415,7 @@ _DEFUN (_strtod_r, (ptr, s00, se), #ifdef INFNAN_CHECK /* Check for Nan and Infinity */ __ULong bits[2]; - static FPI fpinan = /* only 52 explicit bits */ + static _CONST FPI fpinan = /* only 52 explicit bits */ { 52, 1-1023-53+1, 2046-1023-53+1, 1, SI }; if (!decpt) switch(c) { -- cgit v1.1