Peter S. Mazinger 20 rokov pred
rodič
commit
9fda32a9dd
3 zmenil súbory, kde vykonal 9 pridanie a 1 odobranie
  1. 5 1
      libc/stdlib/stdlib.c
  2. 2 0
      libc/stdlib/strtof.c
  3. 2 0
      libc/stdlib/strtold.c

+ 5 - 1
libc/stdlib/stdlib.c

@@ -201,9 +201,13 @@ _stdlib_wcsto_ll(register const wchar_t * __restrict str,
 /**********************************************************************/
 #ifdef L_atof
 
+extern double __strtod (__const char *__restrict __nptr,
+		      char **__restrict __endptr)
+     __THROW __nonnull ((1)) __wur attribute_hidden;
+
 double atof(const char *nptr)
 {
-	return strtod(nptr, (char **) NULL);
+	return __strtod(nptr, (char **) NULL);
 }
 
 #endif

+ 2 - 0
libc/stdlib/strtof.c

@@ -23,6 +23,8 @@
  * to an internal conversion from a double to a float, thereby wasting a bunch
  * of precision.  But this is small, and works for now... */
 
+#define strtod __strtod
+
 #include <stdlib.h>
 
 float strtof (const char *str, char **endptr)

+ 2 - 0
libc/stdlib/strtold.c

@@ -23,6 +23,8 @@
  * to an internal conversion from a double to a long double, thereby losing
  * tons of precision.  But this is small, and works for now... */
 
+#define strtod __strtod
+
 #include <stdlib.h>
 
 long double strtold (const char *str, char **endptr)