initial load of upstream version 1.06.32
[xmlrpc-c] / lib / util / include / c_util.h
1 #ifndef C_UTIL_H_INCLUDED
2 #define C_UTIL_H_INCLUDED
3
4 /* C language stuff.  Doesn't involve any libraries that aren't part of
5    the compiler.
6 */
7
8 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
9
10 /* GNU_PRINTF_ATTR lets the GNU compiler check printf-type
11    calls to be sure the arguments match the format string, thus preventing
12    runtime segmentation faults and incorrect messages.
13 */
14 #ifdef __GNUC__
15 #define GNU_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
16 #else
17 #define GNU_PRINTF_ATTR(a,b)
18 #endif
19
20 #endif