M. Warner Losh wrote:
In message: <[EMAIL PROTECTED]>
            Micah <[EMAIL PROTECTED]> writes:
: #define MAXNAMLEN 255
: char d_name[MAXNAMLEN + 1]; /* name must be no longer than : this */
: #if !__BSD_VISIBLE
: #undef MAXNAMLEN
: #endif
: };
: I'm not sure if it's more readable, but it puts 255 in only one location.

And if I defined MAXNAMLEN before I included this file?  You can't do
it that way :-(

Warner

I stand corrected. I assumed that since any defined MAXNAMLEN's get clobbered if __BSD_VISIBLE is set there was no desire to have a MAXNAMLEN defined when __BSD_VISIBLE was cleared. Seems like the current way might lead to unexpected behavior if you're trying to define a custom MAXNAMLEN. But I haven't really hacked much kernel code yet, I just hang out here to learn.

- Micah
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to