From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26965 invoked by alias); 24 Jul 2017 22:44:02 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 26367 invoked by uid 89); 24 Jul 2017 22:44:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ua0-f174.google.com Received: from mail-ua0-f174.google.com (HELO mail-ua0-f174.google.com) (209.85.217.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Jul 2017 22:43:59 +0000 Received: by mail-ua0-f174.google.com with SMTP id k43so53409880uaf.3 for ; Mon, 24 Jul 2017 15:43:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cJhkkD2kFgFqwYUbvGXWw0M9ieo3iGqAelfl1X2uUpY=; b=uPm/2PF4gFkybpFvVcJ5EQI44gHzYbEoHMJVM9IIQ60WmORRT1fxxL1Fcp51NPcuu6 13nY16l12mRH90IUeof2qVjBE9cnqQ650CDpZBLNvWbdk5NxbycitVS7TZ7BTaf/Vn2Y kdC2Fv+zB33JipBrWRQSHEqs967YxMfTeNsp9oWUO5Sszx9pK/A5YTiEMwVlFFDKB8/6 gIUFL8m/a5a57q7AtSZEGStbUq5jnqEJlUVZvnZl9q67jSKYvfYpf9Tl6gEWVwTXLsde /U7q2bj9gkAhdbvHykgNtddsCBL9Yr4gniJnmV4waYE9CAhL7U5m/ZOjcXMSKBS3DChZ H9aQ== X-Gm-Message-State: AIVw113p6BCzFrbt164wneaBT3GE4YlSxkajCxMDRdttMeSFiuRkLfV2 LVRIAFosqjo1xcVnQLn9w3VlkNZDgZT/ X-Received: by 10.31.33.80 with SMTP id h77mr7866875vkh.11.1500936238024; Mon, 24 Jul 2017 15:43:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.59.29 with HTTP; Mon, 24 Jul 2017 15:43:57 -0700 (PDT) In-Reply-To: <20170724193328.16893-1-aadit0402@gmail.com> References: <20170724193328.16893-1-aadit0402@gmail.com> From: Gedare Bloom Date: Mon, 24 Jul 2017 22:44:00 -0000 Message-ID: Subject: Re: [PATCH 1/7] Adding declaration of reentrant version of inttypes methods. To: Aditya Upadhyay Cc: "newlib@sourceware.org" Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00635.txt.bz2 On Mon, Jul 24, 2017 at 3:33 PM, Aditya Upadhyay wrote: > --- > 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 > #include > #include > +#include "_ansi.h" > +#include > #include > #define __need_wchar_t > #include > > +#if __POSIX_VISIBLE >= 200809 > +#include > +#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); I think it would be better to add these function declarations to the corresponding patch that adds the function definitions, e.g. this should go with the strtoimax.c changes. > 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); So these two would be added by the patch adding the code for strtoumax_l and strtoumax_r. > 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 >