add our previous compat additions to musl src
This commit is contained in:
Родитель
06b2dd819a
Коммит
5792bf57a9
|
@ -0,0 +1,2 @@
|
|||
Files in this directory are not strictly standard musl libc, but implemented here for compatibility for Emscripten purposes.
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#include <ctype.h>
|
||||
|
||||
char *strlwr(char *str)
|
||||
{
|
||||
char *ret = str;
|
||||
while(*str)
|
||||
{
|
||||
*str = tolower(*str);
|
||||
++str;
|
||||
}
|
||||
return ret;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
unsigned long long strtoull_l(const char *restrict s, char **restrict p, int base, locale_t loc)
|
||||
{
|
||||
return strtoull(s, p, base);
|
||||
}
|
||||
|
||||
long long strtoll_l(const char *restrict s, char **restrict p, int base, locale_t loc)
|
||||
{
|
||||
return strtoll(s, p, base);
|
||||
}
|
||||
|
||||
unsigned long strtoul_l(const char *restrict s, char **restrict p, int base, locale_t loc)
|
||||
{
|
||||
return strtoul(s, p, base);
|
||||
}
|
||||
|
||||
long strtol_l(const char *restrict s, char **restrict p, int base, locale_t loc)
|
||||
{
|
||||
return strtol(s, p, base);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#include <ctype.h>
|
||||
|
||||
char *strupr(char *str)
|
||||
{
|
||||
char *ret = str;
|
||||
while(*str)
|
||||
{
|
||||
*str = toupper(*str);
|
||||
++str;
|
||||
}
|
||||
return ret;
|
||||
}
|
Загрузка…
Ссылка в новой задаче