userspace: Allow building without SSE
I had added changes that had broken compilation without sse support
This commit is contained in:
@@ -158,6 +158,7 @@ static T strtoT(const char* str, char** endp, int base, int& error)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if __enable_sse
|
||||
template<BAN::floating_point T>
|
||||
static T strtoT(const char* str, char** endp, int& error)
|
||||
{
|
||||
@@ -303,11 +304,14 @@ static T strtoT(const char* str, char** endp, int& error)
|
||||
result *= BAN::Math::pow<T>((base == 10) ? 10 : 2, exponent);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __enable_sse
|
||||
double atof(const char* str)
|
||||
{
|
||||
return strtod(str, nullptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
int atoi(const char* str)
|
||||
{
|
||||
@@ -324,6 +328,7 @@ long long atoll(const char* str)
|
||||
return strtoll(str, nullptr, 10);
|
||||
}
|
||||
|
||||
#if __enable_sse
|
||||
float strtof(const char* __restrict str, char** __restrict endp)
|
||||
{
|
||||
return strtoT<float>(str, endp, errno);
|
||||
@@ -338,6 +343,7 @@ long double strtold(const char* __restrict str, char** __restrict endp)
|
||||
{
|
||||
return strtoT<long double>(str, endp, errno);
|
||||
}
|
||||
#endif
|
||||
|
||||
long strtol(const char* __restrict str, char** __restrict endp, int base)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user