DragonFly BSD
DragonFly kernel List (threaded) for 2004-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: #ifdef INET6


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Dec 2004 14:27:00 -0800 (PST)

:Hey guys,
:
:	I was fixing up some bad code in logger(1) and came across:
:
:94 #ifdef INET6
:95                 case '6':
:96                         family = PF_INET6;
:97                         break;
:98 #endif
:
:Now we should do something similar to the actual optstring of getopt.
:Although, talking to Joerg he has a strong dislike for INET6 within
:userland. Whats the stand on this?
:
:-- 
:Liam J. Foy
:<liamfoy@xxxxxxxxxxxxx>
:Say it in the living years...

    Well, the above statement could very easily be rewritten like this,
    if portability is required:

	case 6:
#ifdef PF_INET6
		family = PF_INET6;
		break;
#else
		warn("ipv6 not currently supported");
		break;
#endif

    In userland there is no real need for an 'INET6' conditional and,
    Generally speaking, -6 options should not be conditionalized out
    except when portability is an issue.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]