mirror of
https://github.com/fluencelabs/musl
synced 2025-04-25 23:32:15 +00:00
more header fixes, minor warning fix
This commit is contained in:
parent
5377715ce0
commit
c247ebdd98
@ -10,12 +10,19 @@ extern "C" {
|
|||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#define __NEED_wchar_t
|
#define __NEED_wchar_t
|
||||||
#define __NEED_wint_t
|
#define __NEED_wint_t
|
||||||
|
|
||||||
|
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
|
||||||
#define __NEED_wctype_t
|
#define __NEED_wctype_t
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
#include <bits/alltypes.h>
|
||||||
|
|
||||||
#undef NULL
|
#undef NULL
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define NULL 0
|
||||||
|
#else
|
||||||
#define NULL ((void*)0)
|
#define NULL ((void*)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef WCHAR_MIN
|
#undef WCHAR_MIN
|
||||||
#undef WCHAR_MAX
|
#undef WCHAR_MAX
|
||||||
@ -74,9 +81,6 @@ size_t mbrlen (const char *, size_t, mbstate_t *);
|
|||||||
size_t mbsrtowcs (wchar_t *, const char **, size_t, mbstate_t *);
|
size_t mbsrtowcs (wchar_t *, const char **, size_t, mbstate_t *);
|
||||||
size_t wcsrtombs (char *, const wchar_t **, size_t, mbstate_t *);
|
size_t wcsrtombs (char *, const wchar_t **, size_t, mbstate_t *);
|
||||||
|
|
||||||
int wcwidth (wchar_t);
|
|
||||||
int wcswidth (const wchar_t *, size_t);
|
|
||||||
|
|
||||||
float wcstof (const wchar_t *, wchar_t **);
|
float wcstof (const wchar_t *, wchar_t **);
|
||||||
double wcstod (const wchar_t *, wchar_t **);
|
double wcstod (const wchar_t *, wchar_t **);
|
||||||
long double wcstold (const wchar_t *, wchar_t **);
|
long double wcstold (const wchar_t *, wchar_t **);
|
||||||
@ -126,6 +130,9 @@ size_t wcsftime (wchar_t *, size_t, const wchar_t *, const struct tm *);
|
|||||||
|
|
||||||
#undef iswdigit
|
#undef iswdigit
|
||||||
|
|
||||||
|
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
|
||||||
|
int wcwidth (wchar_t);
|
||||||
|
int wcswidth (const wchar_t *, size_t);
|
||||||
int iswalnum(wint_t);
|
int iswalnum(wint_t);
|
||||||
int iswalpha(wint_t);
|
int iswalpha(wint_t);
|
||||||
int iswblank(wint_t);
|
int iswblank(wint_t);
|
||||||
@ -142,8 +149,9 @@ int iswctype(wint_t, wctype_t);
|
|||||||
wint_t towlower(wint_t);
|
wint_t towlower(wint_t);
|
||||||
wint_t towupper(wint_t);
|
wint_t towupper(wint_t);
|
||||||
wctype_t wctype(const char *);
|
wctype_t wctype(const char *);
|
||||||
|
#undef iswdigit
|
||||||
#define iswdigit(a) ((unsigned)(a)-'0' < 10)
|
#define iswdigit(a) ((unsigned)(a)-'0' < 10)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ wint_t towupper(wint_t);
|
|||||||
wctrans_t wctrans(const char *);
|
wctrans_t wctrans(const char *);
|
||||||
wctype_t wctype(const char *);
|
wctype_t wctype(const char *);
|
||||||
|
|
||||||
|
#undef iswdigit
|
||||||
#define iswdigit(a) ((unsigned)((a)-L'0') < 10)
|
#define iswdigit(a) ((unsigned)((a)-L'0') < 10)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
#include <wctype.h>
|
||||||
|
|
||||||
#define R(a,b,w) { (b), (w)/2, (b)-(a) }
|
#define R(a,b,w) { (b), (w)/2, (b)-(a) }
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
intmax_t strtoimax(const char *s1, char **p, int base)
|
intmax_t strtoimax(const char *s1, char **p, int base)
|
||||||
{
|
{
|
||||||
const unsigned char *s = s1;
|
const unsigned char *s = (const void *)s1;
|
||||||
int sign = 0;
|
int sign = 0;
|
||||||
uintmax_t x;
|
uintmax_t x;
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ intmax_t strtoimax(const char *s1, char **p, int base)
|
|||||||
if (*s == '-') sign = *s++;
|
if (*s == '-') sign = *s++;
|
||||||
else if (*s == '+') s++;
|
else if (*s == '+') s++;
|
||||||
|
|
||||||
x = strtoumax(s, p, base);
|
x = strtoumax((const void *)s, p, base);
|
||||||
if (x > INTMAX_MAX) {
|
if (x > INTMAX_MAX) {
|
||||||
if (!sign || -x != INTMAX_MIN)
|
if (!sign || -x != INTMAX_MIN)
|
||||||
errno = ERANGE;
|
errno = ERANGE;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
#include <wctype.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
#include <wctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user