Menu

[r1401]: / advanced / lib / util / include / c_util.h  Maximize  Restore  History

Download this file

20 lines (16 with data), 520 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#ifndef C_UTIL_H_INCLUDED
#define C_UTIL_H_INCLUDED
/* C language stuff. Doesn't involve any libraries that aren't part of
the compiler.
*/
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
/* GNU_PRINTF_ATTR lets the GNU compiler check printf-type
calls to be sure the arguments match the format string, thus preventing
runtime segmentation faults and incorrect messages.
*/
#ifdef __GNUC__
#define GNU_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
#else
#define GNU_PRINTF_ATTR(a,b)
#endif
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.