From 43d0c30bf0b4cf722aa0debb12c552f822387f4c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 4 Oct 2007 12:26:38 +0200 Subject: 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. --- gl/lib/se-context.in.h | 31 ++++++++++++++++++++++++++ gl/lib/se-context_.h | 31 -------------------------- gl/lib/se-selinux.in.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++ gl/lib/se-selinux_.h | 54 ---------------------------------------------- gl/m4/selinux-context-h.m4 | 3 +-- gl/m4/selinux-selinux-h.m4 | 3 +-- gl/modules/selinux-h | 14 ++++++------ 7 files changed, 95 insertions(+), 95 deletions(-) create mode 100644 gl/lib/se-context.in.h delete mode 100644 gl/lib/se-context_.h create mode 100644 gl/lib/se-selinux.in.h delete mode 100644 gl/lib/se-selinux_.h (limited to 'gl') 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 +/* 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 diff --git a/gl/lib/se-context_.h b/gl/lib/se-context_.h deleted file mode 100644 index 26e1709f1..000000000 --- a/gl/lib/se-context_.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef SELINUX_CONTEXT_H -# define SELINUX_CONTEXT_H - -# include -/* 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 diff --git a/gl/lib/se-selinux.in.h b/gl/lib/se-selinux.in.h new file mode 100644 index 000000000..b08c7eee4 --- /dev/null +++ b/gl/lib/se-selinux.in.h @@ -0,0 +1,54 @@ +#ifndef SELINUX_SELINUX_H +# define SELINUX_SELINUX_H + +# include +# include +/* 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 unsigned short security_class_t; +# define security_context_t char* +# define is_selinux_enabled() 0 + +static inline int getcon (security_context_t *con) { errno = ENOTSUP; return -1; } +static inline void freecon (security_context_t con) {} + + +static inline int getfscreatecon (security_context_t *con) + { errno = ENOTSUP; return -1; } +static inline int setfscreatecon (security_context_t con) + { errno = ENOTSUP; return -1; } +static inline int matchpathcon (char const *s, mode_t m, + security_context_t *con) + { errno = ENOTSUP; return -1; } + +static inline int getfilecon (char const *s, security_context_t *con) + { errno = ENOTSUP; return -1; } +static inline int lgetfilecon (char const *s, security_context_t *con) + { errno = ENOTSUP; return -1; } +static inline int setfilecon (char const *s, security_context_t con) + { errno = ENOTSUP; return -1; } +static inline int lsetfilecon (char const *s, security_context_t con) + { errno = ENOTSUP; return -1; } +static inline int fsetfilecon (int fd, security_context_t con) + { errno = ENOTSUP; return -1; } + +static inline int security_check_context (security_context_t con) + { errno = ENOTSUP; return -1; } +static inline int security_check_context_raw (security_context_t con) + { errno = ENOTSUP; return -1; } +static inline int setexeccon (security_context_t con) + { errno = ENOTSUP; return -1; } +static inline int security_compute_create (security_context_t scon, + security_context_t tcon, + security_class_t tclass, + security_context_t *newcon) + { errno = ENOTSUP; return -1; } +#endif diff --git a/gl/lib/se-selinux_.h b/gl/lib/se-selinux_.h deleted file mode 100644 index b08c7eee4..000000000 --- a/gl/lib/se-selinux_.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef SELINUX_SELINUX_H -# define SELINUX_SELINUX_H - -# include -# include -/* 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 unsigned short security_class_t; -# define security_context_t char* -# define is_selinux_enabled() 0 - -static inline int getcon (security_context_t *con) { errno = ENOTSUP; return -1; } -static inline void freecon (security_context_t con) {} - - -static inline int getfscreatecon (security_context_t *con) - { errno = ENOTSUP; return -1; } -static inline int setfscreatecon (security_context_t con) - { errno = ENOTSUP; return -1; } -static inline int matchpathcon (char const *s, mode_t m, - security_context_t *con) - { errno = ENOTSUP; return -1; } - -static inline int getfilecon (char const *s, security_context_t *con) - { errno = ENOTSUP; return -1; } -static inline int lgetfilecon (char const *s, security_context_t *con) - { errno = ENOTSUP; return -1; } -static inline int setfilecon (char const *s, security_context_t con) - { errno = ENOTSUP; return -1; } -static inline int lsetfilecon (char const *s, security_context_t con) - { errno = ENOTSUP; return -1; } -static inline int fsetfilecon (int fd, security_context_t con) - { errno = ENOTSUP; return -1; } - -static inline int security_check_context (security_context_t con) - { errno = ENOTSUP; return -1; } -static inline int security_check_context_raw (security_context_t con) - { errno = ENOTSUP; return -1; } -static inline int setexeccon (security_context_t con) - { errno = ENOTSUP; return -1; } -static inline int security_compute_create (security_context_t scon, - security_context_t tcon, - security_class_t tclass, - security_context_t *newcon) - { errno = ENOTSUP; return -1; } -#endif diff --git a/gl/m4/selinux-context-h.m4 b/gl/m4/selinux-context-h.m4 index 4011dde2a..269c15230 100644 --- a/gl/m4/selinux-context-h.m4 +++ b/gl/m4/selinux-context-h.m4 @@ -1,5 +1,5 @@ # serial 1 -*- Autoconf -*- -# Copyright (C) 2006 Free Software Foundation, Inc. +# Copyright (C) 2006, 2007 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -9,7 +9,6 @@ AC_DEFUN([gl_HEADERS_SELINUX_CONTEXT_H], [ - AC_LIBSOURCES([se-context_.h]) # Check for , AC_CHECK_HEADERS([selinux/context.h], [SELINUX_CONTEXT_H=], diff --git a/gl/m4/selinux-selinux-h.m4 b/gl/m4/selinux-selinux-h.m4 index 13ce2ac9a..822ffa209 100644 --- a/gl/m4/selinux-selinux-h.m4 +++ b/gl/m4/selinux-selinux-h.m4 @@ -1,5 +1,5 @@ # serial 1 -*- Autoconf -*- -# Copyright (C) 2006 Free Software Foundation, Inc. +# Copyright (C) 2006, 2007 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -9,7 +9,6 @@ AC_DEFUN([gl_HEADERS_SELINUX_SELINUX_H], [ - AC_LIBSOURCES([se-selinux_.h]) # Check for , AC_CHECK_HEADERS([selinux/selinux.h], [SELINUX_SELINUX_H=], diff --git a/gl/modules/selinux-h b/gl/modules/selinux-h index 915b9d276..97a70c998 100644 --- a/gl/modules/selinux-h +++ b/gl/modules/selinux-h @@ -2,8 +2,8 @@ Description: SELinux-related headers for systems that lack them. Files: -lib/se-context_.h -lib/se-selinux_.h +lib/se-context.in.h +lib/se-selinux.in.h m4/selinux-context-h.m4 m4/selinux-selinux-h.m4 @@ -14,18 +14,20 @@ gl_HEADERS_SELINUX_SELINUX_H gl_HEADERS_SELINUX_CONTEXT_H Makefile.am: +lib_SOURCES += se-context.in.h se-selinux.in.h + BUILT_SOURCES += $(SELINUX_SELINUX_H) -selinux/selinux.h: se-selinux_.h +selinux/selinux.h: se-selinux.in.h mkdir -p selinux - cp $(srcdir)/se-selinux_.h $@-t + cp $(srcdir)/se-selinux.in.h $@-t chmod a-x $@-t mv $@-t $@ MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t BUILT_SOURCES += $(SELINUX_CONTEXT_H) -selinux/context.h: se-context_.h +selinux/context.h: se-context.in.h mkdir -p selinux - cp $(srcdir)/se-context_.h $@-t + cp $(srcdir)/se-context.in.h $@-t chmod a-x $@-t mv $@-t $@ MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t -- cgit v1.2.3-70-g09d2