diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-01-16 14:31:44 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-01-16 14:31:44 +0200 |
commit | 19389f2b82ec54fd4c847a18f16482e7be4c9887 (patch) | |
tree | d97abb593a7e858755dc72d4107f7e217fbd2e49 | |
parent | Make Uncompresed Size validation more strict (diff) | |
download | xz-19389f2b82ec54fd4c847a18f16482e7be4c9887.tar.xz |
Added ARRAY_SIZE(array) macro.
Diffstat (limited to '')
-rw-r--r-- | src/common/sysdefs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h index 7b69504c..8ebe476f 100644 --- a/src/common/sysdefs.h +++ b/src/common/sysdefs.h @@ -154,4 +154,8 @@ typedef unsigned char _Bool; # define MAX(x, y) ((x) > (y) ? (x) : (y)) #endif +#ifndef ARRAY_SIZE +# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) +#endif + #endif |