summaryrefslogtreecommitdiff
path: root/gl/lib/se-context.in.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2007-10-04 12:26:38 +0200
committerJim Meyering <meyering@redhat.com>2007-10-04 12:33:32 +0200
commit43d0c30bf0b4cf722aa0debb12c552f822387f4c (patch)
tree1f7d757de5241a609bd9e96683f8eecc10ff8742 /gl/lib/se-context.in.h
parenta7acdf85e48f3e337455e1da4a3fa35c21dc64b4 (diff)
downloadcoreutils-43d0c30bf0b4cf722aa0debb12c552f822387f4c.tar.xz
Adapt to new gnulib naming scheme.
* gl/lib/se-context.in.h: Rename from gl/lib/se-context_.h. * gl/lib/se-selinux.in.h: Rename from gl/lib/se-selinux_.h. * gl/m4/selinux-context-h.m4: Remove use of AC_LIBSOURCES. * gl/m4/selinux-selinux-h.m4: Likewise. * gl/modules/selinux-h (Files, Makefile.am): Reflect renaming. (Makefile.am) [lib_SOURCES]: Add se-context.in.h and se-selinux.in.h.
Diffstat (limited to 'gl/lib/se-context.in.h')
-rw-r--r--gl/lib/se-context.in.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/gl/lib/se-context.in.h b/gl/lib/se-context.in.h
new file mode 100644
index 000000000..26e1709f1
--- /dev/null
+++ b/gl/lib/se-context.in.h
@@ -0,0 +1,31 @@
+#ifndef SELINUX_CONTEXT_H
+# define SELINUX_CONTEXT_H
+
+# include <errno.h>
+/* Some systems don't have ENOSYS. */
+# ifndef ENOSYS
+# ifdef ENOTSUP
+# define ENOSYS ENOTSUP
+# else
+/* Some systems don't have ENOTSUP either. */
+# define ENOSYS EINVAL
+# endif
+# endif
+
+typedef int context_t;
+static inline context_t context_new (char const *s)
+ { errno = ENOTSUP; return 0; }
+static inline char *context_str (context_t con)
+ { errno = ENOTSUP; return (void *) 0; }
+static inline void context_free (context_t c) {}
+
+static inline int context_user_set (context_t sc, char const *s)
+ { errno = ENOTSUP; return -1; }
+static inline int context_role_set (context_t sc, char const *s)
+ { errno = ENOTSUP; return -1; }
+static inline int context_range_set (context_t sc, char const *s)
+ { errno = ENOTSUP; return -1; }
+static inline int context_type_set (context_t sc, char const *s)
+ { errno = ENOTSUP; return -1; }
+
+#endif