OT: Portability (Re: tuxracer...2)
"Albert D. Cahalan" wrote:
>
> Michel =?iso-8859- writes:
> > Jens Schmalzing wrote:
> >> Michel D\344nzer writes:
>
> >>> Which one would that be? BenH told me the offset text is caused by
> >>> the dreaded (un)signed char issue.
> >>
> >> Precisely that. And therefore, it wasn't a big deal to fix. But
> >> since I made a package for my personal use out of it, why not share it
> >> with others.
> >
> > Have you fixed it properly or just with -fsigned-char?
>
> "properly"?
>
> The "signed" keyword is new, added by the same committee that
> came up with trigraphs. This is all about kissing IBM's butt
> for EBCDIC-encrypted text on IBM mainframes and minicomputers.
> Proper UNIX systems use a signed char. PowerPC Linux gets an
> unsigned char from AIX, which gets it from being done by IBM.
> Ugh. The proper fix involves changing your gcc spec file.
Show me a standard which defines char as being signed and I'll happily file a
bug against gcc.
At least we seem to agree that -fsigned-char isn't a solution. ;)
> While I'm at it, PowerPC chips can handle the correct byte order.
'Correct'? While I much prefer big endian (the only advantage of little endian
seems to be for hiding bad code), I don't pretend being able to judge which
one is 'correct'.
If you prefer little endian, you are free to start a little endian port of the
Linux kernel for PowerPC or use different OSs and/or hardware.
> We bring these portability problems on ourselves.
I strongly disagree. Code relying on broken assumptions is simply broken.
--
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member / CS student, Free Software enthusiast
Reply to: