Re: "signed" versus "__signed__" versus "__signed" in arch-specific "types.h" files

From: Luca Tettamanti
Date: Sun Oct 29 2006 - 12:02:51 EST


Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> ha scritto:
> so the keyword alias "__signed__" is used early on in nearly every
> types.h file but, if __KERNEL__ is defined, the file falls back to
> just using "signed". (the use of "unsigned" is, of course, consistent
> throughout.)

When __KERNEL__ is not defined then that part of the header may be
exposed to userspace[1]. Older compilers (or newer versions of gcc with
-traditional used to compile old programs) don't recognize the keyword
'signed', hence the alternate keyword is used.
Extreme backward compatibility I'd say ;) I doubt that today is
possibile to compile anything with -traditional on a distro recent
enough to use kernel 2.6.

Luca
[1] You'd better use the cleaned up version of the headers though.
--
"It is more complicated than you think"
-- The Eighth Networking Truth from RFC 1925
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/