From b6eb9827a6866981c08cc9613ca8b4a648894fb1 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sat, 2 May 2015 18:30:00 +0100 Subject: Add OSSL_NELEM macro. Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson --- e_os.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'e_os.h') diff --git a/e_os.h b/e_os.h index f4a427af0a..7f94bfcae6 100644 --- a/e_os.h +++ b/e_os.h @@ -689,6 +689,8 @@ struct servent *getservbyname(const char *name, const char *proto); # endif # endif +#define OSSL_NELEM(x) (sizeof(x)/sizeof(x[0])) + #ifdef __cplusplus } #endif -- cgit v1.2.3