vapier | 2751f26 | 2008-02-11 16:39:54 +0000 | [diff] [blame] | 1 | /* |
| 2 | * compiler.h: take care of fun compiler details here |
| 3 | * |
| 4 | * Licensed under the GPL-2 or later |
| 5 | */ |
| 6 | |
| 7 | #ifndef __LTP_COMPILER_H__ |
| 8 | #define __LTP_COMPILER_H__ |
| 9 | |
subrata_modak | 88c166c | 2009-06-09 16:01:20 +0000 | [diff] [blame] | 10 | #define LTP_ATTRIBUTE_NORETURN __attribute__((noreturn)) |
subrata_modak | 04f47a1 | 2009-09-18 17:44:08 +0000 | [diff] [blame^] | 11 | #define LTP_ATTRIBUTE_UNUSED __attribute__((unused)) |
vapier | 2751f26 | 2008-02-11 16:39:54 +0000 | [diff] [blame] | 12 | |
vapier | 37e9aaf | 2008-09-24 04:39:38 +0000 | [diff] [blame] | 13 | #ifndef ARRAY_SIZE |
subrata_modak | 88c166c | 2009-06-09 16:01:20 +0000 | [diff] [blame] | 14 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) |
vapier | 37e9aaf | 2008-09-24 04:39:38 +0000 | [diff] [blame] | 15 | #endif |
| 16 | |
subrata_modak | 88c166c | 2009-06-09 16:01:20 +0000 | [diff] [blame] | 17 | #endif /* __LTP_COMPILER_H__ */ |