From owner-freebsd-bugs Tue Apr 15 00:41:03 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA22874 for bugs-outgoing; Tue, 15 Apr 1997 00:41:03 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA22865 for ; Tue, 15 Apr 1997 00:41:00 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id RAA17735; Tue, 15 Apr 1997 17:34:16 +1000 Date: Tue, 15 Apr 1997 17:34:16 +1000 From: Bruce Evans Message-Id: <199704150734.RAA17735@godzilla.zeta.org.au> To: peter@spinner.DIALix.COM, phk@dk.tfs.com Subject: Re: misc/3291: md2.h, md4.h, and md5.h headers useless for c++ programms Cc: freebsd-bugs@freebsd.org, tejblum@arc.hq.cti.ru Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> > > 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 This goes without saying :-). >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. It is a bug for an application to #include . No section 2 or section 3 man pages refer to it (I recently fixed a couple of references). style.9 doesn't quite say that it is an implementation detail. >In /usr/include, the only files that use __BEGIN_DECLS without explicitly >including cdefs.h first are: >... >mpool.h is outright broken, pthread_np.h is an extention of pthreads.h, so >that isn't so clear. pthread_np.h is also missing lots of typedefs. Clearly it is not meant to be used by itself. md4.h now depends on for the definition of u32_t. This was broken when 64-bit support was fixed (md4.h previously used `unsigned long'). This shouldn't be fixed by including , since pollutes the namespace with select and ntoh macros and POSIX typedefs. md5.h includes which has the same problem as md4.h and uglier ifdefs. Bruce