From owner-freebsd-hackers Mon Sep 28 10:00:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA12064 for freebsd-hackers-outgoing; Mon, 28 Sep 1998 10:00:24 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from yonge.cs.toronto.edu (yonge.cs.toronto.edu [128.100.2.11]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id KAA11998 for ; Mon, 28 Sep 1998 10:00:18 -0700 (PDT) (envelope-from dholland@cs.toronto.edu) Received: from qew.cs.toronto.edu ([128.100.2.15]) by yonge.cs.toronto.edu with SMTP id <86577-25407>; Mon, 28 Sep 1998 12:59:49 -0400 Received: by qew.cs.toronto.edu id <37768-5346>; Mon, 28 Sep 1998 12:59:21 -0400 Subject: Re: Quick code style question. From: David Holland To: cracauer@cons.org (Martin Cracauer) Date: Mon, 28 Sep 1998 12:59:19 -0400 Cc: nialls@euristix.ie, hackers@FreeBSD.ORG In-Reply-To: <19980923141618.A21991@cons.org> from "Martin Cracauer" at Sep 23, 98 08:16:18 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <98Sep28.125921edt.37768-5346@qew.cs.toronto.edu> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Surely it would be much better if these were either protected by a > > _NETDB_INTERNAL_ macro or moved into a separate header in lib/libc/net. > > Which of these two is preferable? > > Not speaking for the FreeBSD project and not commenting on your > getservent() changes, I think the macros would do. Likewise, but I'd say make a private header file. Private interfaces should not be publically available. Otherwise next year someone who wants to change the interface will discover some bonehead application #defining __NETDB_INTERNAL__. > On the technical side, the macro solution is also better because it > easily supports more than two levels of visibility and it is easy to > raise or lower the level of visibilty from inside another header > file or on the compiler command line. This, in my view, is the chief reason not to do it. :-) -- - David A. Holland | (please continue to send non-list mail to dholland@cs.utoronto.ca | dholland@hcs.harvard.edu. yes, I moved.) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message