Remove stray spaces
[llpp.git] / cutils.h
blobe6df0ce9961ebd52aba5b33bf1557b64e2b98d66
1 #ifndef CUTILS_H
2 #define CUTILS_H
4 #if defined __GNUC__
5 #define NORETURN_ATTR __attribute__ ((noreturn))
6 #define UNUSED_ATTR __attribute__ ((unused))
7 #if !defined __clang__
8 #define NO_OPTIMIZE_ATTR __attribute__ ((optimize ("O0")))
9 #else
10 #define NO_OPTIMIZE_ATTR __attribute__ ((optnone))
11 #endif
12 #define GCC_FMT_ATTR(a, b) __attribute__ ((format (printf, a, b)))
13 #else
14 #error Stringent C compiler requirements not satisfied
15 #endif
17 extern void NORETURN_ATTR GCC_FMT_ATTR (2, 3)
18 err (int exitcode, const char *fmt, ...);
19 extern void NORETURN_ATTR GCC_FMT_ATTR (2, 3)
20 errx (int exitcode, const char *fmt, ...);
21 extern void *parse_pointer (const char *cap, const char *s);
22 extern double now (void);
23 extern void fmt_linkn (char *s, unsigned int u);
24 extern char *ystrdup (const char *s);
26 #endif