On Mon, 03 Jun 2013, Christos Zoulas wrote:
| > Well, there is an advantage that the FreeBSD one has over ours. It can be
| > used in c++ with -Wold-style-cast, if defined as:
| >
| > #define __DECONST(t, a) const_cast<t>(a)
|
| That, and why is it cast to an unsigned long and not uintptr_t?
So that it does not bring in another header to define uintptr_t.
unsigned long might not be long enough. I'd rather bring in
another header than have code that might do the wrong thing on
some future platform.
We should probably have a header that defines "__" versions of
some useful types without polluting the namespace, and then use
__intptr_t.
--apb (Alan Barrett)