include: Add _countof macro.

Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Daniel Lehman 2016-09-01 10:27:40 -07:00 committed by Alexandre Julliard
parent 417e542e7a
commit 1ce7356498
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ typedef struct _ldiv_t {
__msvcrt_long rem; __msvcrt_long rem;
} ldiv_t; } ldiv_t;
#define _countof(x) (sizeof(x)/sizeof((x)[0]))
#define __max(a,b) (((a) > (b)) ? (a) : (b)) #define __max(a,b) (((a) > (b)) ? (a) : (b))
#define __min(a,b) (((a) < (b)) ? (a) : (b)) #define __min(a,b) (((a) < (b)) ? (a) : (b))
#ifndef __cplusplus #ifndef __cplusplus