This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 1/7] Adding declaration of reentrant version of inttypes methods.
- From: Aditya Upadhyay <aadit0402 at gmail dot com>
- To: newlib at sourceware dot org
- Cc: Aditya Upadhyay <aadit0402 at gmail dot com>
- Date: Tue, 25 Jul 2017 01:03:28 +0530
- Subject: [PATCH 1/7] Adding declaration of reentrant version of inttypes methods.
- Authentication-results: sourceware.org; auth=none
---
newlib/libc/include/inttypes.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/newlib/libc/include/inttypes.h b/newlib/libc/include/inttypes.h
index 25c6e99fa..c2a0483fb 100644
--- a/newlib/libc/include/inttypes.h
+++ b/newlib/libc/include/inttypes.h
@@ -16,10 +16,16 @@
#include <newlib.h>
#include <sys/config.h>
#include <sys/_intsup.h>
+#include "_ansi.h"
+#include <sys/reent.h>
#include <stdint.h>
#define __need_wchar_t
#include <stddef.h>
+#if __POSIX_VISIBLE >= 200809
+#include <xlocale.h>
+#endif
+
#define __STRINGIFY(a) #a
/* 8-bit types */
@@ -315,9 +321,17 @@ extern "C" {
extern intmax_t imaxabs(intmax_t j);
extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denomer);
+extern intmax_t strtoimax_l(const char *__restrict, char **_restrict, int, locale_t);
+extern intmax_t _strtoimax_r(struct _reent *, const char *__restrict, char **__restrict, int, locale_t);
extern intmax_t strtoimax(const char *__restrict, char **__restrict, int);
+extern uintmax_t strtoumax_l(const char *__restrict, char **_restrict, int, locale_t);
+extern uintmax_t _strtoumax_r(struct _reent *, const char *__restrict, char **__restrict, int, locale_t);
extern uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
+extern intmax_t wcstoimax_l(const wchar_t *__restrict, wchar_t **_restrict, int, locale_t);
+extern intmax_t _wcstoimax_r(struct _reent *, const wchar_t *__restrict, wchar_t **__restrict, int, locale_t);
extern intmax_t wcstoimax(const wchar_t *__restrict, wchar_t **__restrict, int);
+extern uintmax_t wcstoumax_l(const wchar_t *__restrict, wchar_t **_restrict, int, locale_t);
+extern uintmax_t _wcstoumax_r(struct _reent *, const wchar_t *__restrict, wchar_t **__restrict, int, locale_t);
extern uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int);
#ifdef __cplusplus
--
2.13.0