Importing strtoimax inttypes method from FreeBSD.

This commit is contained in:
Aditya Upadhyay
2017-08-02 08:49:39 +05:30
committed by Corinna Vinschen
parent 109a3a02a3
commit 910cc30c10
3 changed files with 182 additions and 0 deletions

View File

@ -16,10 +16,15 @@
#include <newlib.h>
#include <sys/config.h>
#include <sys/_intsup.h>
#include "_ansi.h"
#include <stdint.h>
#define __need_wchar_t
#include <stddef.h>
#if __BSD_VISIBLE
#include <xlocale.h>
#endif
#define __STRINGIFY(a) #a
/* 8-bit types */
@ -309,6 +314,8 @@ typedef struct {
intmax_t rem;
} imaxdiv_t;
struct _reent;
#ifdef __cplusplus
extern "C" {
#endif
@ -316,10 +323,15 @@ extern "C" {
extern intmax_t imaxabs(intmax_t j);
extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denomer);
extern intmax_t strtoimax(const char *__restrict, char **__restrict, int);
extern intmax_t _strtoimax_r(struct _reent *, const char *__restrict, char **__restrict, int);
extern uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
extern intmax_t wcstoimax(const wchar_t *__restrict, wchar_t **__restrict, int);
extern uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int);
#if __BSD_VISIBLE
extern intmax_t strtoimax_l(const char *__restrict, char **_restrict, int, locale_t);
#endif
#ifdef __cplusplus
}
#endif