This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Build fails with an error in setlocale.h
- From: Matthew Wahab <matthew dot wahab at foss dot arm dot com>
- To: newlib at sourceware dot org
- Cc: corinna at vinschen dot de
- Date: Tue, 16 Aug 2016 11:37:15 +0100
- Subject: Build fails with an error in setlocale.h
- Authentication-results: sourceware.org; auth=none
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