aboutsummaryrefslogtreecommitdiffstats
path: root/e_os.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-05-02 18:30:00 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-05-03 12:53:08 +0100
commitb6eb9827a6866981c08cc9613ca8b4a648894fb1 (patch)
treec5a6351461d8be964bc1f31fa2e34c4ebb7cfafd /e_os.h
parent31ff45aa975acb43f1da20e714eadf4649655714 (diff)
downloadopenssl-b6eb9827a6866981c08cc9613ca8b4a648894fb1.tar.gz
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 <tjh@openssl.org>
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h2
1 files changed, 2 insertions, 0 deletions
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