This is the mail archive of the
mailing list for the newlib project.
Re: Build fails with an error in setlocale.h
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
unknown type name 'locale_t'; did you mean 'clockid_t'?
size_t, size_t, mbstate_t *, locale_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.
newlib-cygwin/newlib/libc/locale/localeconv.c: In function '__localeconv_l':
newlib-cygwin/newlib/libc/locale/localeconv.c:47:10: error: 'lconv' undeclared
(first use in this function); did you mean 'lconv'?
I think that this is because the lconv is declared and used
struct lconv *lconv = &locale->lconv;
#endif /* __HAVE_LOCALE_INFO__ */
That's easy to fix but I then get failures in time/strftime.c
newlib-cygwin/newlib/libc/time/../time/strftime.c: In function '__strftime':
newlib-cygwin/newlib/libc/time/../time/strftime.c:701:48: warning: implicit
declaration of function '__get_time_locale'; did you mean
const struct lc_time_T *_CurrentTimeLocale = __get_time_locale (locale);
I also get errors for the use of era_info_t and other types in that function
newlib-cygwin/newlib/libc/time/../time/strftime.c: In function 'wcsftime':
newlib-cygwin/newlib/libc/time/../time/strftime.c:1446:3: error: unknown type
name 'era_info_t'; did you mean '__ino_t'?
era_info_t *era_info = NULL;
But I haven't been able to track down what causes those.