C99 allows array function parameters to use the static keyword for their
sizes. This tells the compiler that the parameter will have at least the
specified size, and calling code will fail to compile if that guarantee is
not met. However, this syntax is not legal in C++.
This commit reverts r300824, which worked around the problem for
sys/sys/md5.h only, and introduces a new macro: min_size(). min_size(x) can
be used in headers as a static array size, but will still compile in C++
mode.
Reviewed by: cem, ed
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8277
(Makefile.inc1): add dependency of xinstall on libmd to
avoid failure of parallel bootstrap.
(lib/libmd/*.h): do not redefine symbols if already
defined as macros (libcrypt uses the same sources internally,
redefining symbols with a prefix of its own).
Fixes build failures caused by previous change to libmd.
Reported by: ian
Pointy hat to: thomas
Add a prefix to all symbols in libmd to avoid incompatibilites
with same-named, but not binary compatible, symbols from libcrypto.
Also introduce Weak aliases to avoid the need to rebuild dependent
binaries and a major version bump.
PR: 199119
Differential Revision: D2216
Reviewed by: roberto, delphij
MFC after: 2 weeks
Imported libmd. This library contains MD2, MD4 and MD5.
These three boggers pop up all over the place all of the time, so I
decided we needed a library with them. In general they are used for
security checks, so if you use them you want to link them static.