mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 11:00:41 +08:00
84a6dba57e
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/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 fix a typo in __STDC_VERSION__ in __min_size requirements MFC after: 1 week Sponsored by: Panzura