[En-Nut-Discussion] Yagarto from 23.12.2009 and newlib again...

Ulrich Prinz uprinz2 at netscape.net
Thu Feb 4 00:39:04 CET 2010


> Have you fixed the code? Perhaps you could provide a patch? Does it
> still compiles with the older versions of newlib and with other
> toolchains (AVR for example)?
> 
Just a suggestion...

If we insert a definition like this

#ifndef USE_NEWLIB_CHARPTR
#define NLIB_CHAR char
#endif

and make this available through nutconfig, it will work as a selectable 
option and does not bother other architectures or compilers. The 
nutconfig option sets the option to char by default, the user can set it 
to int.

Then string related functions concerned could be modified like this:
isalnum((NLIB_CHAR)*ptr1)

I added the configuration option under
Tools->YAGARTO ARM Settings->Newlib compatibility as a choicebox.

Good idea? I did it in my code like this and added include/cfg/newlib.h 
for this configuration option. Code works fine now with the new newlib.

I could commit it that way.





More information about the En-Nut-Discussion mailing list