selinux-h: new module (from coreutils/gl/)
[gnulib.git] / lib / se-context.in.h
1 #ifndef SELINUX_CONTEXT_H
2 # define SELINUX_CONTEXT_H
3
4 # include <errno.h>
5 /* Some systems don't have ENOTSUP.  */
6 # ifndef ENOTSUP
7 #  ifdef ENOSYS
8 #   define ENOTSUP ENOSYS
9 #  else
10 /* Some systems don't have ENOSYS either.  */
11 #   define ENOTSUP EINVAL
12 #  endif
13 # endif
14
15 typedef int context_t;
16 static inline context_t context_new (char const *s)
17   { errno = ENOTSUP; return 0; }
18 static inline char *context_str (context_t con)
19   { errno = ENOTSUP; return (void *) 0; }
20 static inline void context_free (context_t c) {}
21
22 static inline int context_user_set (context_t sc, char const *s)
23   { errno = ENOTSUP; return -1; }
24 static inline int context_role_set (context_t sc, char const *s)
25   { errno = ENOTSUP; return -1; }
26 static inline int context_range_set (context_t sc, char const *s)
27   { errno = ENOTSUP; return -1; }
28 static inline int context_type_set (context_t sc, char const *s)
29   { errno = ENOTSUP; return -1; }
30
31 #endif