summaryrefslogtreecommitdiff
path: root/modules/selinux-h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-07-30 12:56:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-07-31 12:00:34 -0700
commit786bb6fb17d698eb175942606db8fb129e231474 (patch)
tree531d2f0f261eb9540f454a650ee78a8915139a51 /modules/selinux-h
parentc44470fb95020b371e31202bf2884ca021b3dd73 (diff)
downloadgnulib-786bb6fb17d698eb175942606db8fb129e231474.tar.gz
gnulib-common: update for C2x 2020-12-11 draft
Use blessed-by-draft-standard way to test for [[__deprecated__]] etc.; this is supported by GCC 11 and the fallback code should work fine with GCC 10 and earlier, clang, etc. * NEWS, doc/attribute.texi: Mention that DEPRECATED etc. must now come first. * lib/fflush.c, lib/unistr.in.h: Do not include unused-parameter.h. All uses of _GL_UNUSED_PARAMETER (after parameters) replaced by _GL_ATTRIBUTE_MAYBE_UNUSED (before parameters). Although perhaps we need a shorter name for _GL_ATTRIBUTE_MAYBE_UNUSED, that should probably be in gnulib-common.m4, due to the ubiquity of this issue. And perhaps the snippet/unused-parameter module should be marked obsolete since it's no longer compatible with its old use. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macro _GL_HAS_C_ATTRIBUTE, and use it instead of __STDC_VERSION__ in deciding whether to use C2x attributes like [[__deprecated__]]. (_GL_ATTRIBUTE_MAYBE_UNUSED): Fall back on _GL_ATTRIBUTE_UNUSED. (_GL_ATTRIBUTE_UNUSED): New macro, for labels where C2x [[maybe_unused]] do not work. (_GL_UNUSED, _GL_UNUSED_LABEL): Use it. * modules/fflush, modules/unistr/base (Depends-on): Remove snippet/unused-parameter. * modules/fflush (selinux/selinux.h, selinux/context.h) (selinux/label.h): Do not use $(UNUSED_PARAMETER). Remove useless chmod a-x.
Diffstat (limited to 'modules/selinux-h')
-rw-r--r--modules/selinux-h17
1 files changed, 5 insertions, 12 deletions
diff --git a/modules/selinux-h b/modules/selinux-h
index 26face8a78..00328bf20f 100644
--- a/modules/selinux-h
+++ b/modules/selinux-h
@@ -16,7 +16,6 @@ m4/selinux-selinux-h.m4
Depends-on:
errno
extern-inline
-snippet/unused-parameter
configure.ac:
gl_HEADERS_SELINUX_SELINUX_H
@@ -31,7 +30,7 @@ lib_SOURCES += se-context.in.h se-label.in.h se-selinux.in.h \
se-context.c se-label.c se-selinux.c
BUILT_SOURCES += selinux/selinux.h
-selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
+selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status
$(AM_V_at)$(MKDIR_P) selinux
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@@ -40,23 +39,19 @@ selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAME
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \
- -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
< $(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)
if GL_GENERATE_SELINUX_CONTEXT_H
-selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
+selinux/context.h: se-context.in.h $(top_builddir)/config.status
$(AM_V_at)$(MKDIR_P) selinux
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
- < $(srcdir)/se-context.in.h; \
+ cat $(srcdir)/se-context.in.h; \
} > $@-t && \
- chmod a-x $@-t && \
mv $@-t $@
else
selinux/context.h: $(top_builddir)/config.status
@@ -66,14 +61,12 @@ MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t
BUILT_SOURCES += $(SELINUX_LABEL_H)
if GL_GENERATE_SELINUX_LABEL_H
-selinux/label.h: se-label.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
+selinux/label.h: se-label.in.h $(top_builddir)/config.status
$(AM_V_at)$(MKDIR_P) selinux
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
- < $(srcdir)/se-label.in.h; \
+ cat $(srcdir)/se-label.in.h; \
} > $@-t && \
- chmod a-x $@-t && \
mv $@-t $@
else
selinux/label.h: $(top_builddir)/config.status