Commit d012a76d authored by Matthias Braun's avatar Matthias Braun
Browse files

libfirm requires C99 now so we can just use strtold

parent 0500fe61
......@@ -24,15 +24,6 @@
#include "xmalloc.h"
static long double string_to_long_double(const char *str)
{
#if __STDC_VERSION__ >= 199901L || _POSIX_C_SOURCE >= 200112L
return strtold(str, NULL);
#else
return strtod(str, NULL);
#endif
}
/** The number of extra precision rounding bits */
#define ROUNDING_BITS 2
......@@ -647,7 +638,7 @@ void *fc_val_from_str(const char *str, size_t len, void *result)
char *buffer = alloca(len + 1);
memcpy(buffer, str, len);
buffer[len] = '\0';
long double val = string_to_long_double(buffer);
long double val = strtold(buffer, NULL);
return fc_val_from_ieee754(val, result);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment