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] |
On Feb 9 12:46, Eric Blake wrote: > On 02/09/2018 09:13 AM, Jaap de Wolff wrote: > > The functions that can be used to create or modify locales are adapted. > > Functions to create or duplicate a locale are returning NULL now. > > Should they also set an errno? > > Yes. > > > And if they should, what errno should they set? > > > _duplocale_r (struct _reent *p, struct __locale_t *locobj) > > { > > +#ifdef _REENT_SMALL > > + return NULL; > > This should set ENOMEM (conceptually, we're so small that ALL attempts to > create a locale are beyond the memory limits we have available ;) > > By the way, POSIX says duplocale returns '(locale_)0' on failure; you're > lucky that NULL works here because our locale_t is a wrapper around 'struct > __locale_t*'. Why handling this at all? Does anybody expect a REENT_SMALL target to actually *call* these functions? From my POV it would make more sense to skip compiling these functions into newlib entirely for SMALL targets. Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
Attachment:
signature.asc
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |