<sys/cdefs.h>: Add __min_size(x) macro
authorAaron LI <aly@aaronly.me>
Thu, 16 Nov 2023 07:56:31 +0000 (15:56 +0800)
committerAaron LI <aly@aaronly.me>
Sat, 13 Jan 2024 13:59:33 +0000 (21:59 +0800)
commit25b141f1757067d9564add16b6b1f845e36ceed0
treeb3ce48d59029a9556fce62f45711ddb4e5cf683a
parentbc0a6c824c9605c283be14c58ff2f852c90e7ea9
<sys/cdefs.h>: Add __min_size(x) macro

C99 allows to use the 'static' keyword in function array parameter
declarators, which helps the compiler better validate the passed
argument and optimize code.  However, this syntax isn't allowed in C++.

This macro allows us both to use this C99 feature and to use the headers
in C++.

Obtained-from: FreeBSD
URL: https://reviews.freebsd.org/D8277
sys/sys/cdefs.h