| Age | Commit message (Collapse) | Author |
|
|
|
|
|
From the redhat web page:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gcc/offsetof.html
__offsetof__ (expression)
is equivalent to the parenthesized expression, except that the
expression is considered an integral constant expression even if
it contains certain operators that are not normally permitted in
an integral constant expression. Users should never use __offsetof__
directly; the only valid use of __offsetof__ is to implement the
offsetof macro in <stddef.h>.
|
|
g++-3 does not have a built-in offsetof(), but we cannot use the c version,
otherwise we break with -Wold-style-cast.
Inspired by the DF version, but a bit different.
|
|
expressions using offsetof. Boost-python relies on this, for example.
|
|
Patches provided by Joel Baker in PR 22270, verified by myself.
|
|
Using u_long causes <stddef.h> to undesirably depend on <sys/types.h> .
BTW: Why is the cast needed?
|
|
|
|
std C headers including it, and a kernel module written in C++ would benfit
as well.
|
|
as __null with egcs 1.0 (GCC 2.90) and above. As several headers are affected
by this change, move the definition into a new header file, <null.h>, to ease
maintenance.
|
|
|
|
|
|
|
|
|
|
|