forked from linux-audit/audit-userspace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgcc-attributes.h
More file actions
82 lines (68 loc) · 2.19 KB
/
gcc-attributes.h
File metadata and controls
82 lines (68 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* gcc-attributes.h -- compatibility wrappers for GCC function attributes
* Copyright 2025 Red Hat Inc.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Steve Grubb <sgrubb@redhat.com>
*/
#ifndef AUDIT_GCC_ATTRIBUTES_H
#define AUDIT_GCC_ATTRIBUTES_H
/*
* These macros originate in sys/cdefs.h when glibc is installed. But the
* definitions may be missing on some libc implementations (e.g. musl).
* The purpose of this header is to provide fallbacks when they are
* undefined.
*
* Note: We do not want to ship this file. Therefore the following headers
* CANNOT include this file because they are the public API for the audit
* system: audit-records.h, audit_logging.h, auparse-defs.h, auparse.h,
* auplugin.h and libaudit.h
*/
#ifndef __has_attribute
# define __has_attribute(x) 0
#endif
#ifndef __attr_access
# define __attr_access(x)
#endif
#ifndef __attribute_malloc__
# define __attribute_malloc__
#endif
#ifndef __attr_dealloc
# define __attr_dealloc(dealloc, argno)
#endif
#ifndef __attr_dealloc_free
# define __attr_dealloc_free
#endif
#ifndef __attribute_const__
# define __attribute_const__
#endif
#ifndef __attribute_pure__
# define __attribute_pure__
#endif
#ifndef __nonnull
# define __nonnull(params)
#endif
#ifndef __wur
# define __wur
#endif
/* Linux kernel style branch prediction hints. */
#ifndef likely
# define likely(x) __builtin_expect(!!(x), 1)
#endif
#ifndef unlikely
# define unlikely(x) __builtin_expect(!!(x), 0)
#endif
#endif /* AUDIT_GCC_ATTRIBUTES_H */