From owner-cvs-lib Mon May 19 04:01:59 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA14942 for cvs-lib-outgoing; Mon, 19 May 1997 04:01:59 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA14917; Mon, 19 May 1997 04:01:29 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id UAA11773; Mon, 19 May 1997 20:56:47 +1000 Date: Mon, 19 May 1997 20:56:47 +1000 From: Bruce Evans Message-Id: <199705191056.UAA11773@godzilla.zeta.org.au> To: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-lib@FreeBSD.ORG, peter@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libutil libutil.h Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Modified files: > lib/libutil libutil.h > Log: > Now I really understand the reason for the style.9 rule about not having > visible type names in prototypes in user space headers. libutil.h > generates warnings with -Wall over the use of "const char *ttyname". > It's lucky it wasn't a #define conflict. > Is a single '_' prefix acceptable? or does it need to be two? Two '_'s are only useful for extra defense against broken programs that #define reserved names. Two are unnecessary for the same reason that two are unnecessary for most of the members of the FILE struct - the opening parentheses in prototypes changes the scope much like the the opening brace in a struct declaration. Why did -Wall generate warnings? It takes -Wshadow to get a warning for the ttyname in shadowing the one in Bruce