This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Build fails with an error in setlocale.h


Hello,

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
----

The error points to the declaration

diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h
+extern size_t _wcsnrtombs_l (struct _reent *, char *, const wchar_t **,
+			     size_t, size_t, mbstate_t *, locale_t);
+

added by
----
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Aug 10 16:30:46 2016 +0200

    Implement strto[dflu]_l/wcsto[dflu]_l
----

Looking at the surrounding code in that file, I think that locale_t should have been __locale_t.

Let me know if there's anything else I should check,
Matthew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]