Re: 2.1.71 bytesex problems.

Linus Torvalds (torvalds@transmeta.com)
Fri, 5 Dec 1997 11:09:36 -0800 (PST)


On Fri, 5 Dec 1997, Fare Rideau wrote:
>
> > Byte swapping is BROKEN on 2.1.71 when compiler optimizations are turned
> > off, because the standard library does not have a __fswab32() function to
> > fall back on when inlining is not enabled. This needs to be fixed.
> > --Scott
>
> Indeed. But for once, it's not MY fault :)
> Linus made htonl back into a macro to take advantage of constant folding
> (I had them extern inline const functions, but with __u32 instead of
> unsigned long argument and result).

Indeed, this one is mine. But as explained before, htonl really has to be
a macro at least when optimizing (I consider slow code to be almost as
much of a bug as incorrect results). Although it may be enough to just add
a #ifdef __OPTIMIZE__ around the thing.

Linus