From owner-freebsd-current Sun Nov 10 4: 4:50 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E84F37B410 for ; Sun, 10 Nov 2002 04:04:27 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AC5F43EDA for ; Sun, 10 Nov 2002 04:04:16 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 02218AE255; Sun, 10 Nov 2002 04:04:11 -0800 (PST) Date: Sun, 10 Nov 2002 04:04:11 -0800 From: Maxime Henrion To: Marcel Moolenaar Cc: current@freebsd.org Subject: Re: uuid.h is not C++ safe Message-ID: <20021110120411.GV26605@elvis.mu.org> References: <3DC71B56.1050102@137.org> <20021105105813.GD26605@elvis.mu.org> <20021105105927.GE26605@elvis.mu.org> <20021105030419.A19427@FreeBSD.org> <20021105111724.GF26605@elvis.mu.org> <20021105123036.A99916@kayak.xcllnt.net> <20021105234624.GI26605@elvis.mu.org> <20021106013345.GA1633@athlon.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021106013345.GA1633@athlon.pn.xcllnt.net> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Marcel Moolenaar wrote: > On Tue, Nov 05, 2002 at 03:46:24PM -0800, Maxime Henrion wrote: > [snip] > > > > That's arguably bad, sys/uuid.h shouldn't have any !_KERNEL prototypes > > > > in it. > > > > > > If there's a better place, then we should move it. We could put it in > > > , but I don't want to make that header a requirement if one > > > only uses the syscall. I don't yet know what a good place would be, > > > if not . Suggestions? > > > > Well I don't really understand what you mean here. > > I'm not sure I like uuidgen(2) in . is the DCE 1.1 > compliant interface to UUIDs. describes the underlying > generic interface on which builds. It feels wrong to mix > them... > > > Since this prototype > > is #ifndef _KERNEL in sys/sys/uuid.h and since this header is included by > > lib/libc/uuid/uuid.h, moving it into the libc header shouldn't make any > > difference both in visibility and header requirements. > > There is no difference when was included already. There is > a difference when only was included before. One cannot > use uuidgen(2) without also including the DCE 1.1 compliant stuff. What about having uuidgen(2) in sys/uuid.h, but hidden by a _UIDGEN_VISIBLE macro ? That's not very elegant but it will help not polluting the DCE 1.1 namespace with the syscall and let applications which need it (gpt and uuidgen IIRC) have it declared. Of course, we could also have a third header just for uuidgen(2). Cheers, Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message