projects
/
platform
/
upstream
/
xz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bc33a5
)
Added ARRAY_SIZE(array) macro.
author
Lasse Collin
<lasse.collin@tukaani.org>
Wed, 16 Jan 2008 12:31:44 +0000
(14:31 +0200)
committer
Lasse Collin
<lasse.collin@tukaani.org>
Wed, 16 Jan 2008 12:31:44 +0000
(14:31 +0200)
src/common/sysdefs.h
patch
|
blob
|
history
diff --git
a/src/common/sysdefs.h
b/src/common/sysdefs.h
index
7b69504
..
8ebe476
100644
(file)
--- 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