<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 13, 2018, 3:28 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I test currently the tqm8xx BSP which worked fine until RTEMS 5. The <br>
problem is that this BSP uses strtoul() to get some system configuration <br>
parameters from the boot loader. The Newlib used by RTEMS 5 has now <br>
support for C locales in strtoul(). The C locale support needs an <br>
executing thread with a valid Newlib reentrancy structure. This is <br>
definitely not the case during bsp_start().<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Why do we now longer have a global reentrancy structure to fall back on?</div><div dir="auto"><br></div><div dir="auto">If you disable newlib reentrancy via confdefs.h, what happens? </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I think we need a kernel-space ctypes.h implementation without this C <br>
locale stuff and string support functions which use this. For example <br>
FreeBSD has this:<br>
<br>
sys/sys/ctype.h<br>
sys/libkern/strtoul.c<br>
<br>
Maybe add a <rtems/string.h> header file with this content:<br>
<br>
#define rtems_isspace(c) ((c) == ' ' || ((c) >= '\t' && (c) <= '\r'))<br>
#define rtems_isascii(c) (((c) & ~0x7f) == 0)<br>
#define rtems_isupper(c) ((c) >= 'A' && (c) <= 'Z')<br>
#define rtems_islower(c) ((c) >= 'a' && (c) <= 'z')<br>
#define rtems_isalpha(c) (rtems_isupper(c) || rtems_islower(c))<br>
#define rtems_isdigit(c) ((c) >= '0' && (c) <= '9')<br>
#define rtems_isxdigit(c) (rtems_isdigit(c) \<br>
|| ((c) >= 'A' && (c) <= 'F') \<br>
|| ((c) >= 'a' && (c) <= 'f'))<br>
#define rtems_isprint(c) ((c) >= ' ' && (c) <= '~')<br>
#define rtems_toupper(c) ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z')))<br>
#define rtems_tolower(c) ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z')))<br>
<br>
unsigned rtems_strtol(const char *nptr, char **endptr, int base);<br>
unsigned long rtems_strtoul(const char *nptr, char **endptr, int base);<br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : +49 89 189 47 41-16<br>
Fax : +49 89 189 47 41-09<br>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank" rel="noreferrer">sebastian.huber@embedded-brains.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div>