1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Replacement <selinux/label.h> for platforms that lack it.
3 Copyright 2020-2021 Free Software Foundation, Inc.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17
18 /* Written by Paul Eggert. */
19
20 #ifndef SELINUX_LABEL_H
21
22 #define SELINUX_LABEL_H
23
24 #include <selinux/selinux.h>
25 #include <errno.h>
26
27 #ifndef _GL_INLINE_HEADER_BEGIN
28 #error "Please include config.h first."
29 #endif
30 _GL_INLINE_HEADER_BEGIN
31 #ifndef SE_LABEL_INLINE
32 # define SE_LABEL_INLINE _GL_INLINE
33 #endif
34
35 /* The definition of _GL_UNUSED_PARAMETER is copied here. */
36 /* A C macro for declaring that specific function parameters are not used.
37 Copyright (C) 2008-2021 Free Software Foundation, Inc.
38
39 This program is free software: you can redistribute it and/or modify it
40 under the terms of the GNU General Public License as published
41 by the Free Software Foundation; either version 3 of the License, or
42 (at your option) any later version.
43
44 This program is distributed in the hope that it will be useful,
45 but WITHOUT ANY WARRANTY; without even the implied warranty of
46 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
47 General Public License for more details.
48
49 You should have received a copy of the GNU General Public License
50 along with this program. If not, see <https://www.gnu.org/licenses/>. */
51
52 /* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
53 declarations for parameters that are not used. This helps to reduce
54 warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
55 type param _GL_UNUSED_PARAMETER
56 or more generally
57 param_decl _GL_UNUSED_PARAMETER
58 For example:
59 int param _GL_UNUSED_PARAMETER
60 int *(*param)(void) _GL_UNUSED_PARAMETER
61 Other possible, but obscure and discouraged syntaxes:
62 int _GL_UNUSED_PARAMETER *(*param)(void)
63 _GL_UNUSED_PARAMETER int *(*param)(void)
64 */
65 #ifndef _GL_UNUSED_PARAMETER
66 # define _GL_UNUSED_PARAMETER _GL_ATTRIBUTE_MAYBE_UNUSED
67 #endif
68
69 #define SELABEL_CTX_FILE 0
70
71 struct selabel_handle;
72
73 SE_LABEL_INLINE int
selabel_lookup(struct selabel_handle * hnd _GL_UNUSED_PARAMETER,char ** context _GL_UNUSED_PARAMETER,char const * key _GL_UNUSED_PARAMETER,int type _GL_UNUSED_PARAMETER)74 selabel_lookup (struct selabel_handle *hnd _GL_UNUSED_PARAMETER,
75 char **context _GL_UNUSED_PARAMETER,
76 char const *key _GL_UNUSED_PARAMETER,
77 int type _GL_UNUSED_PARAMETER)
78 { errno = ENOTSUP; return -1; }
79
80 SE_LABEL_INLINE struct selabel_handle *
selabel_open(int backend _GL_UNUSED_PARAMETER,struct selinux_opt * options _GL_UNUSED_PARAMETER,unsigned nopt _GL_UNUSED_PARAMETER)81 selabel_open (int backend _GL_UNUSED_PARAMETER,
82 struct selinux_opt *options _GL_UNUSED_PARAMETER,
83 unsigned nopt _GL_UNUSED_PARAMETER)
84 { errno = ENOTSUP; return 0; }
85
86 SE_LABEL_INLINE void
selabel_close(struct selabel_handle * hnd _GL_UNUSED_PARAMETER)87 selabel_close (struct selabel_handle *hnd _GL_UNUSED_PARAMETER)
88 { errno = ENOTSUP; }
89
90 _GL_INLINE_HEADER_END
91
92 #endif
93