libircbot
library providing a framework for implementing an IRC bot
Loading...
Searching...
No Matches
decl.h
Go to the documentation of this file.
1
#ifndef IRCBOT_DECL_H
2
#define IRCBOT_DECL_H
3
10
#undef ircbot___cdecl
11
#undef SOEXPORT
12
#undef SOLOCAL
13
#undef DECLEXPORT
14
15
#define ATTR_ACCESS(x)
16
#define ATTR_ALLOCSZ(x)
17
#define ATTR_CONST
18
#define ATTR_FALLTHROUGH
19
#define ATTR_FORMAT(x)
20
#define ATTR_MALLOC
21
#define ATTR_NONNULL(x)
22
#define ATTR_NORETURN
23
#define ATTR_RETNONNULL
24
#define ATTR_PURE
25
#define CMETHOD
26
27
#ifdef __cplusplus
28
# define ircbot___cdecl extern "C"
29
# define DECLDATA
30
# define C_CLASS_DECL(t) struct t
31
#else
32
# define ircbot___cdecl
33
# define DECLDATA extern
34
# define C_CLASS_DECL(t) typedef struct t t
35
#endif
36
37
#if defined __has_attribute
38
# if __has_attribute (access)
39
# undef ATTR_ACCESS
40
# define ATTR_ACCESS(x) __attribute__ ((access x))
41
# endif
42
# if __has_attribute (alloc_size)
43
# undef ATTR_ALLOCSZ
44
# define ATTR_ALLOCSZ(x) __attribute__ ((alloc_size x))
45
# endif
46
# if __has_attribute (const)
47
# undef ATTR_CONST
48
# define ATTR_CONST __attribute__ ((const))
49
# endif
50
# if __has_attribute (fallthrough)
51
# undef ATTR_FALLTHROUGH
52
# define ATTR_FALLTHROUGH __attribute__ ((fallthrough))
53
# endif
54
# if __has_attribute (format)
55
# undef ATTR_FORMAT
56
# define ATTR_FORMAT(x) __attribute__ ((format x))
57
# endif
58
# if __has_attribute (malloc)
59
# undef ATTR_MALLOC
60
# define ATTR_MALLOC __attribute__ ((malloc))
61
# endif
62
# if __has_attribute (nonnull)
63
# undef ATTR_NONNULL
64
# undef CMETHOD
65
# define ATTR_NONNULL(x) __attribute__ ((nonnull x))
66
# define CMETHOD __attribute__ ((nonnull (1)))
67
# endif
68
# if __has_attribute (noreturn)
69
# undef ATTR_NORETURN
70
# define ATTR_NORETURN __attribute__ ((noreturn))
71
# endif
72
# if __has_attribute (returns_nonnull)
73
# undef ATTR_RETNONNULL
74
# define ATTR_RETNONNULL __attribute__ ((returns_nonnull))
75
# endif
76
# if __has_attribute (pure)
77
# undef ATTR_PURE
78
# define ATTR_PURE __attribute__ ((pure))
79
# endif
80
# if __has_attribute (visibility)
81
# define SOEXPORT ircbot___cdecl __attribute__((visibility("default"
)))
82
# define SOLOCAL __attribute__((visibility("hidden"
)))
83
# else
84
# define SOEXPORT ircbot___cdecl
85
# define SOLOCAL
86
# endif
87
#endif
88
#define DECLEXPORT ircbot___cdecl
89
90
#define STR(m) XSTR(m)
91
#define XSTR(m) #m
92
93
#endif
ircbot
decl.h
Generated by
1.9.5