SIZEOF("Section") and STARTOF("Section") can be known

Fixes #890
This commit is contained in:
Rangi
2021-06-20 16:10:27 -04:00
committed by Eldred Habert
parent 06b57aa1ce
commit a67f5d6e01
7 changed files with 87 additions and 17 deletions

View File

@@ -49,8 +49,10 @@
/* MSVC doesn't support `[static N]` for array arguments from C99 */
#ifdef _MSC_VER
# define MIN_NB_ELMS(N)
# define NONNULL(ptr) *ptr
#else
# define MIN_NB_ELMS(N) static (N)
# define NONNULL(ptr) ptr[static 1]
#endif
// MSVC uses a different name for O_RDWR, and needs an additional _O_BINARY flag