summaryrefslogtreecommitdiffstats
path: root/lib/libmd
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2016-11-22 20:28:17 +0000
committerasomers <asomers@FreeBSD.org>2016-11-22 20:28:17 +0000
commit88e93daae771bcd26c329f87f9f443c02e47c7e4 (patch)
treee6721be614ef89478cfcbe059422f36ce59a3371 /lib/libmd
parent25a075724c584e1686b323f7a28f493e9d4b2c96 (diff)
downloadFreeBSD-src-88e93daae771bcd26c329f87f9f443c02e47c7e4.zip
FreeBSD-src-88e93daae771bcd26c329f87f9f443c02e47c7e4.tar.gz
MFC r307584
Fix C++ includability of crypto headers with static array sizes 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.
Diffstat (limited to 'lib/libmd')
-rw-r--r--lib/libmd/md5.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/libmd/md5.h b/lib/libmd/md5.h
index 1d125a8..5ab3b14 100644
--- a/lib/libmd/md5.h
+++ b/lib/libmd/md5.h
@@ -37,13 +37,5 @@
#endif
-#ifdef __cplusplus
-#define static
-#endif
-
#include <sys/md5.h>
-
-#ifdef __cplusplus
-#undef static
-#endif
#endif /* _MD5_H_ */
OpenPOWER on IntegriCloud