From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54813 invoked by alias); 16 Aug 2016 13:59:13 -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 54778 invoked by uid 89); 16 Aug 2016 13:59:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=setlocale.h, setlocaleh, UD:setlocale.h, newlib-cygwin X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Aug 2016 13:59:11 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 113C030C for ; Tue, 16 Aug 2016 07:00:43 -0700 (PDT) Received: from [10.2.206.222] (e108033-lin.cambridge.arm.com [10.2.206.222]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CD43F3F213 for ; Tue, 16 Aug 2016 06:59:09 -0700 (PDT) Subject: Re: Build fails with an error in setlocale.h To: newlib@sourceware.org References: <57B2ECDB.5000102@foss.arm.com> <20160816104814.2lemuf2myau43nr6@calimero.vinschen.de> <57B2FB65.10402@foss.arm.com> <57B2FF91.4070001@foss.arm.com> <20160816132707.e2yikdclamykzafw@calimero.vinschen.de> From: Matthew Wahab Message-ID: <57B31C2C.2000503@foss.arm.com> Date: Tue, 16 Aug 2016 13:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160816132707.e2yikdclamykzafw@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016/txt/msg00945.txt.bz2 On 16/08/16 14:27, Corinna Vinschen wrote: > Hi Matthew, > > On Aug 16 12:57, Matthew Wahab wrote: > On 16/08/16 12:39, Matthew Wahab wrote: >>> On 16/08/16 11:48, Corinna Vinschen wrote: >>>> On Aug 16 11:37, Matthew Wahab wrote: >>>>> I get a build failure when cross-compiling for aarch64-none-elf, the error >>>>> message is >>>>> ---- >>>>> newlib-cygwin/newlib/libc/stdlib/../locale/setlocale.h:206:38: error: >>>>> unknown type name 'locale_t'; did you mean 'clockid_t'? >>>>> size_t, size_t, mbstate_t *, locale_t); >>>>> ^~~~~~~~ >>>>> clockid_t >>>> >>>> >>>> Can you test that the above patch works for you? I'll check it in then. >>>> >>> >>> Thanks for the patch. It fixes that failure but there's another in localeconv.c: >> >> I've also tried with the second patch and still get the build errors. > > I applied a couple of patches meant to fix the locale stuff on non-Cygwin > targets. Please give them a try. > Thanks for that. The patches worked but now there are failures to do with _C_monetary_locale, _C_numeric_locale, _C_time_locale and _C_messages_locale. e.g. ---- newlib-cygwin/newlib/libc/stdlib/../locale/setlocale.h: In function '__get_monetary_locale': newlib-cygwin/newlib/libc/stdlib/../locale/setlocale.h:329:10: error: incompatible types when returning type 'const struct lc_monetary_T' but 'const struct lc_monetary_T *' was expected return _C_monetary_locale; ^~~~~~~~~~~~~~~~~~ ---- There are a number of these, it looks like they're all in setlocale.h. Matthew