Date: Tue, 15 Apr 1997 22:14:00 +1000 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, dima@tejblum.dnttm.rssi.ru Cc: freebsd-bugs@freebsd.org, peter@spinner.DIALix.COM, phk@dk.tfs.com, tejblum@arc.hq.cti.ru Subject: Re: misc/3291: md2.h, md4.h, and md5.h headers useless for c++ programms Message-ID: <199704151214.WAA28407@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> md5.h includes <sys/md5.h> which has the same problem as md4.h and uglier >> ifdefs. > >And what, you suggest that applications will use own typedef for >u_int32_t before including <md4.h>? If application itself will use >#include <sys/types.h> to obtain the definition, it will get the namespace >pollution. No, <md4.h> should use __u_int_32_t or something like that, and it should #include a non-polluting version of <sys/types.h> to get this typedef. >Why force application to include <sys/types.h> before <md5.h>? Other If <md5.h> really depended on <sys/types.h>, then it might be best to force the application to include both so that the dependency on <sys/types.h> is obvious. In any case, the documentation for <md5.h> would need to say that all the names and bugs in <sys/types.h> are reserved. BTW, the docs don't say that the identifiers in the md5 state are reserved. The following reasonable program fails mysteriously: #define count 100 #include <sys/types.h> #include <md5.h> >May be, include <machine/types.h> in <md4.h> and <sys/md5.h> for >u_int32_t? This would be better that <sys/types.h>. <machine/types.h> only uses C and POSIX reserved identifiers, and _physaddr, r, physaddr, and val. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704151214.WAA28407>