Date: Tue, 17 Jan 2017 17:55:36 -0800 From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com> To: Daniel Eischen <deischen@freebsd.org> Cc: Maxim Sobolev <sobomax@freebsd.org>, Ian Lepore <ian@freebsd.org>, "Conrad E. Meyer" <cem@freebsd.org>, src-committers <src-committers@freebsd.org>, 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 Message-ID: <EB949AD3-D2A4-4727-B77E-07FCFE726C66@gmail.com> In-Reply-To: <Pine.GSO.4.64.1701172039390.15850@sea.ntplx.net> References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <CAH7qZftckckygNG3HRqikiaGds6FsOedUR7AWKGi-PJg96FQjA@mail.gmail.com> <CAH7qZftsYAoBj7gFpOMHgT9a12N1yshAGY%2BkAEkpbTks7LL29Q@mail.gmail.com> <20170117212713.GZ2611@FreeBSD.org> <CAH7qZfuu7SWG7Ff7k1BU6ChwwA4SqC%2BG%2BcTHjtjEr%2BAS_Q5p0g@mail.gmail.com> <CAG6CVpXTVucnJUXzx%2B7VPPHkw-AptwSdNCjnz2QsTrgewGqKVA@mail.gmail.com> <1484697145.86335.183.camel@freebsd.org> <CAH7qZfuCPWeZ8OzkZKq0sp5A_Xuy-z=6jDWzrvehC5MMi1dugQ@mail.gmail.com> <Pine.GSO.4.64.1701172039390.15850@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <deischen@freebsd.org> = 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EB949AD3-D2A4-4727-B77E-07FCFE726C66>