[nos-bbs] gcc ARM + color issue + (yeah) UNSIGNED forced on char !!!
M Langelaar
maiko at pcsinternet.ca
Sun Feb 16 21:34:39 EST 2020
Another wake up call ? apparently more efficient for ARM to use unsigned
then signed.
The reason color is not working is gcc on the ARM processor (ie,
raspbian on PI 4)
automatically defaults char to UNSIGNED, unlike on a non-ARM processor.
So what
happens is if you initialize an array (ie, color maps) with -1, it
automatically makes
it a 255 instead (since -1 is not possible on an unsigned char). Then
the rest of the
code has trouble since all the conditions are looking for a -1, not a
255. I found it
via several debug lines I put into the JNOS curses.c.
SOO this potentially brings up more then just color issues, possible
instability ?
What else gets 'broke' in the ARM version of JNOS ? So here is a request
from
me to the PI people, please edit your makefile and add the following :
-fsigned-char
to the end of the PATCHES = directive
Then make clean, ./configure, make
Your color should now work and hopefully JNOS will be more stable ? Let
it run
for a while, notice if anything improves or gets worse ? Whatever you
can do.
Thank you.
Maiko / VE4KLM
More information about the nos-bbs
mailing list