mlibc: Mescc-tools support: strtol: partly implement stub.

* mlibc/libc-mes+tcc.c (strtol): Partly implement stub.
This commit is contained in:
Jan Nieuwenhuizen 2017-11-19 16:54:13 +01:00
parent 0fcdfef284
commit 8eae2d81a4
1 changed files with 6 additions and 1 deletions

View File

@ -309,7 +309,12 @@ long
strtol (char const *nptr, char **endptr, int base)
{
eputs ("strtol stub\n");
return 0;
if (!strncmp (nptr, "0x", 2))
{
char const *p = nptr + 2;
return _atoi (&p, 16);
}
return _atoi (&nptr, base);
}
long long int