From owner-svn-src-head@freebsd.org Wed Jan 18 01:43:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EBB9CB41FD; Wed, 18 Jan 2017 01:43:59 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.netplex.net", Issuer "RapidSSL SHA256 CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5F90153F; Wed, 18 Jan 2017 01:43:58 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.15.1/8.15.1/NETPLEX) with ESMTP id v0I1gHXs011242; Tue, 17 Jan 2017 20:42:17 -0500 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.4.3 (mail.netplex.net [204.213.176.9]); Tue, 17 Jan 2017 20:42:17 -0500 (EST) Date: Tue, 17 Jan 2017 20:42:17 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net Reply-To: Daniel Eischen To: Maxim Sobolev cc: Ian Lepore , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312296 - in head: lib/libc/sys sys/kern sys/netinet sys/netinet6 sys/sys tools/regression/sockets/udp_pingpong tools/regression/sockets/unix_cmsg In-Reply-To: Message-ID: References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <20170117212713.GZ2611@FreeBSD.org> <1484697145.86335.183.camel@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2017 01:43:59 -0000 On Tue, 17 Jan 2017, Maxim Sobolev wrote: > Also there is at least one thing that makes enum less desirable from the > point of view of application developer. Particularly it makes it impossible > to use preprocessor to do a conditional compilation, which is especially > important for the FreeBSD-specific options. With the "old" way, I can > easily have something like: > > #if defined(SO_TS_CLOCK) > ... > setsockopt(SO_TS_CLOCK, ...); > #else > [do something else] > #endif > > This does not work with enums for obvious reasons, one would need to resort > to using some kind of autoconfigure mechanism to figure out if the enum in > question is defined. Great point, we (at $JOB) have code that this, and would break if changed to enums. -- DE