Date: Tue, 15 Apr 1997 14:33:33 +0800 From: Peter Wemm <peter@spinner.DIALix.COM> To: phk@dk.tfs.com Cc: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>, freebsd-bugs@freebsd.org Subject: Re: misc/3291: md2.h, md4.h, and md5.h headers useless for c++ programms Message-ID: <199704150633.OAA29112@spinner.DIALix.COM> In-Reply-To: Your message of "Tue, 15 Apr 1997 07:55:51 %2B0200." <1289.861083751@critter>
next in thread | previous in thread | raw e-mail | index | archive | help
phk@dk.tfs.com wrote: > > > I can agree to the __BEGIN_DECLS, but the #includes do >NOT< belong here. > > > > Why? Take a look at <stdlib.h>, 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 <sys/cdefs.h> 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 <db.h>, which #includes cdefs.h anyway. pthread_np.h broken; requires prior #include <pthread.h> (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704150633.OAA29112>