svn commit: r217369 - in head/sys: cam/scsi sys

Bruce Evans brde at
Sat Jan 15 02:43:03 UTC 2011

On Fri, 14 Jan 2011 mdf at wrote:

> On Thu, Jan 13, 2011 at 10:50 PM, Bruce Evans <brde at> wrote:
>> On Thu, 13 Jan 2011 mdf at wrote:
>>> There appear to be 330 uses of SYSCTL and QUAD on the same line in
>>> CURRENT.  This seems reasonable to change them to S64, U64 and X64 so
>>> they correctly reflect the size they operate upon.
>>> What do y'all think?
>> Now I suggest delaying this until they can be renamed to a type- generic
>> SYSCTL_INT() (would probably need to be spelled differently, SYSCTL_I()
>> say, even if SYSCTL_INT() was changed at the same time).
> I'm torn on this one.  The compiler knows the type (unless, for
> SYSCTL_INT, NULL/0 is used, but that is also a compile-time check),
> but to interpret it requires the use of __builtin_foo which is a gcc
> extension and not part of standard C.
> Philosophically, while I like this kind of letting the compiler do the
> work, if you want C++ you know where to find it.

Oops.  I think sizeof() and issigned() can be used to determine the type
well enough in functions and initialized data (do a fuller type check if
the compiler supports it), but I don't know how to do this in static
sysctl declarations (since sizeof() can't be used in cpp expressions).


More information about the svn-src-head mailing list