mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 15:43:56 +00:00
committed by
Christian Helmuth
parent
d884cf1a9a
commit
d9d65aa86b
@ -142,7 +142,11 @@ char *getenv(const char *name)
|
||||
long int strtol(const char *nptr, char **endptr, int base)
|
||||
{
|
||||
long res = 0;
|
||||
Genode::ascii_to<long>(nptr, &res, base);
|
||||
if (base != 0 && base != 10) {
|
||||
PERR("strtol: base of %d is not supported", base);
|
||||
return 0;
|
||||
}
|
||||
Genode::ascii_to(nptr, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -150,7 +154,7 @@ long int strtol(const char *nptr, char **endptr, int base)
|
||||
double strtod(const char *nptr, char **endptr)
|
||||
{
|
||||
double res = 0;
|
||||
Genode::ascii_to<double>(nptr, &res, 0);
|
||||
Genode::ascii_to(nptr, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
#include <base/snprintf.h>
|
||||
#include <nic_session/nic_session.h>
|
||||
#include <cap_session/connection.h>
|
||||
#include <os/config.h>
|
||||
#include <nic/xml_node.h>
|
||||
#include <util/xml_node.h>
|
||||
#include <os/config.h>
|
||||
|
||||
#include <extern_c_begin.h>
|
||||
#include <lx_emul.h>
|
||||
|
@ -1034,7 +1034,7 @@ int dev_set_name(struct device *dev, const char *fmt, ...)
|
||||
int strict_strtoul(const char *s, unsigned int base, unsigned long *res)
|
||||
{
|
||||
unsigned long r = -EINVAL;
|
||||
Genode::ascii_to<unsigned long>(s, &r, base);
|
||||
Genode::ascii_to_unsigned_long(s, r, base);
|
||||
*res = r;
|
||||
|
||||
return r;
|
||||
|
Reference in New Issue
Block a user