From owner-svn-src-all@freebsd.org Wed Jan 18 01:55:39 2017 Return-Path: Delivered-To: svn-src-all@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 4C993CB45A6; Wed, 18 Jan 2017 01:55:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1367C1D0D; Wed, 18 Jan 2017 01:55:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id t6so5264509pgt.1; Tue, 17 Jan 2017 17:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=whOTlZJGwByI5faJoSHqOQgsH70SQ5GVK/xNHUBS9q8=; b=F6V4l+Pa9hUITqzXcsoMkLhhU7vSR+NBXzfvjNuilSm9uT6r170CiCPhfu2aez/aet A9YUofYyyZzNYd6aOxaSGTWUOuAIOV6O4n93hVrZGKA/C5J0OuGukvYjuor+Sdm1RVRT oWUiAhemAQDcmPpF5Vm3RsbWkhnK8PqLS5gfMYWrAwjvVme1Ui3vbUf9C09JfdnhtQDQ lf3IRGEm3CZqSYKTT2nw/VTnk+Z/6JLGJETTmDKZ2qJBl3j/AFlukpVdhi7PcCYZUf1N OwwkaNGGbQUFpLDvkh+1wzOlID9UNcIAfVmwp9QLN83Ra6ebhHevl4bahsoEMwt86Rrq i6hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=whOTlZJGwByI5faJoSHqOQgsH70SQ5GVK/xNHUBS9q8=; b=T1FDRAUDpQyyjXI/H09wtUSz1sW4O5VvgmYlRnY1LpJCEsvRvkrPR7PaLUKoUOAXxC +X4D3/NvGQH7My0Ji16fG5zyjUVa3948r8/F/ES4k0X45C7VUdUS2cvCsYBU+59BnLTM vUxY0sbvJw8hU8roDUMueYpC5QR68xZc5NxK2/7ruzwbbh7SknVVbhG9UP7Cfz6wPgJX Aea/rpTxjpdYPO0UL4E95sEUYMwGxtADIo5mvvx9J0H61v5Inp2mIzIOaIdmexBaEs5X zhGCJGw80pkf/bOoJEWfxwpmU8fpaJIUGozoWBeDHVWqaItb6GEVEPURWWbxFuHzuEVx ZBWA== X-Gm-Message-State: AIkVDXK27oEWQdueGkHov8cwc2QDX0VoryVcZJCNNUcdtvULGRPOg7LFECtjAGgXqcP5wA== X-Received: by 10.99.174.75 with SMTP id e11mr937351pgp.89.1484704538448; Tue, 17 Jan 2017 17:55:38 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p25sm58650402pfd.0.2017.01.17.17.55.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 17:55:38 -0800 (PST) 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 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EA543583-7822-402D-B929-224972642460"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Tue, 17 Jan 2017 17:55:36 -0800 Cc: Maxim Sobolev , Ian Lepore , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <20170117212713.GZ2611@FreeBSD.org> <1484697145.86335.183.camel@freebsd.org> To: Daniel Eischen X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2017 01:55:39 -0000 --Apple-Mail=_EA543583-7822-402D-B929-224972642460 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 17, 2017, at 17:42, Daniel Eischen = wrote: >=20 > On Tue, 17 Jan 2017, Maxim Sobolev wrote: >=20 >> 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: >>=20 >> #if defined(SO_TS_CLOCK) >> ... >> setsockopt(SO_TS_CLOCK, ...); >> #else >> [do something else] >> #endif >>=20 >> 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. >=20 > Great point, we (at $JOB) have code that this, and would break > if changed to enums. I=E2=80=99m not saying enums would be a bad idea, but it would = require more work on the autoconf end as well, and would make testing = for these symbols' support a little less straightforward. Maybe a combination of #define=E2=80=99s for determining whether = or not the support is present, i.e. for simple #ifdef folks (I would = probably only use one though), and having a sample for testing for = support in autoconf in some products would be beneficial? Thanks, -Ngie --Apple-Mail=_EA543583-7822-402D-B929-224972642460 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYfssZAAoJEPWDqSZpMIYVlL4QAMkoAZAYzDcO/Y184l/kMxSb zUmCzTl39l/3ORffMP+YBv0LzWMgsXUyc+H8H4TAB6gIk1wd8SwBtvqLAcReL/jo jtrwkSeQ41XntmX5bp/+t3/76TE7y/j+GFThoRuwIpqZynzLz1xfn5Dgx7BwtVTm ofvRy0k5DCWoGdJh0N1mvywUiYfE4CEyq6NXFSZB/U/cMKFuhCsktMyBoeCOoyeh 3BJTfrbhj2URus9CqAKvoB+bnhGj/l48tEhEOQvi6Uh6wyVdL6/XidKC89ia6MSI oTF4UGxBqYYtDXNOZgwdPKwp1DHYA7ufIjoTYM/uJHv+2Qj9nK2tK0qIJOGhS/f6 H9wlzMCn6diV9Q0yAIvYVe1XQVfg7f8VUn/fkmTlbAyKwVaL+RWCOwhbInufE8en kkXNfpEqNI1wxiCI41JzTnMfrV3lgcllG5ZtBhaCb9D1fCb7INi6wMtnAQbKVQ+y UO8xPhpvazyr77IvNVyosZq2lNm5PdOCdHXfxLfZ1azGNKrUN056T8TDLoEa9ngD FjD+GRKC/n0oeFtzJg6yUf4IwZneUgtH2ypbSBhG+VjvS6fIESHFA8PPori/hm/O 23kk1ETA0NF7gmYYzelWCrpQMBjrNxY3oNvp2R/pfnX8JkFBO4GmgDfJWy66NUwX KtaFhIHu7eeoSBN5k+H8 =zPmc -----END PGP SIGNATURE----- --Apple-Mail=_EA543583-7822-402D-B929-224972642460--