From owner-freebsd-bugs Mon Apr 14 23:34:32 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA20016 for bugs-outgoing; Mon, 14 Apr 1997 23:34:32 -0700 (PDT) Received: from spinner.DIALix.COM (root@spinner.dialix.com [192.203.228.67]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA20009 for ; Mon, 14 Apr 1997 23:34:24 -0700 (PDT) Received: from spinner.DIALix.COM (peter@localhost.DIALix.oz.au [127.0.0.1]) by spinner.DIALix.COM (8.8.5/8.8.5) with ESMTP id OAA29112; Tue, 15 Apr 1997 14:33:34 +0800 (WST) Message-Id: <199704150633.OAA29112@spinner.DIALix.COM> X-Mailer: exmh version 2.0gamma 1/27/96 To: phk@dk.tfs.com cc: Dmitrij Tejblum , freebsd-bugs@freebsd.org Subject: Re: misc/3291: md2.h, md4.h, and md5.h headers useless for c++ programms In-reply-to: Your message of "Tue, 15 Apr 1997 07:55:51 +0200." <1289.861083751@critter> Date: Tue, 15 Apr 1997 14:33:33 +0800 From: Peter Wemm Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk phk@dk.tfs.com wrote: > > > I can agree to the __BEGIN_DECLS, but the #includes do >NOT< belong here. > > > > Why? Take a look at , for example. > > stdlib.h is a ANSI (POSIX?) header, we have to follow the crowd on that. Headers should be self sufficient. Converting a header that used to be self sufficent (eg: on the 2.2 series) to one that isn't (on 3.0+) is a bad move. It'll just make people more reluctant to use libmd and roll their own instead. IMHO, yes, fine, make it use __BEGIN_DECLS etc, but don't break add "you must now #include first even though you didn't before" to it. In /usr/include, the only files that use __BEGIN_DECLS without explicitly including cdefs.h first are: ctype.h #includes runetype.h, which has cdefs.h mpool.h broken ndbm.h #include , which #includes cdefs.h anyway. pthread_np.h broken; requires prior #include (which has cdefs.h) rune.h #includes runetype.h, which has cdefs.h mpool.h is outright broken, pthread_np.h is an extention of pthreads.h, so that isn't so clear. Most of sys/* does it correctly too, at least as far as cdefs.h. Cheers, -Peter