summaryrefslogtreecommitdiff
path: root/lib/se-context.in.h
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* Make generated .in.h files as standalone as possible.Bruno Haible2021-08-221-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Reported by Jan Engelhardt <jengelh@inai.de>. * lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE, _GL_ATTRIBUTE_MALLOC): Add fallback definitions. * lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add fallback definitions. * lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition. * lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition. * lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition. * lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency with the other *.in.h files. * lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback definition. * lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise. * lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise. * lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of _GL_UNUSED. (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback definitions.
* gnulib-common: update for C2x 2020-12-11 draftPaul Eggert2021-07-311-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* Add some copyright headers.Bruno Haible2020-07-051-0/+18
| | | | | | | | | | | | | | | * lib/dev-ino.h: Add copyright header. * lib/di-set.h: Likewise. * lib/fchown-stub.c: Likewise. * lib/file-set.h: Likewise. * lib/hash-triple.h: Likewise. * lib/idcache.h: Likewise. * lib/ino-map.h: Likewise. * lib/mkancesdirs.h: Likewise. * lib/scratch_buffer.h: Likewise. * lib/se-context.in.h: Likewise. * lib/stdopen.h: Likewise. * lib/userspec.h: Likewise.
* selinux-h: improve stub types and add more stub functionsPádraig Brady2013-11-281-0/+8
| | | | | | | | | * lib/se-selinux.in.h: Change security_context_t to a typedef rather than a define, as it's a pointer type and so is better as a typedef to avoid issues declaring multiple variables with the comma operator. Also add stub for string_to_security_class(). * lib/se-context.in.h: Add stub functions for context_{type,range,role,user}_get().
* headers: check that _GL_INLINE_HEADER_BEGIN is definedPaul Eggert2013-08-281-0/+3
| | | | | | | | | | | | | | | | | | | | Suggested by Bruce Korb in: http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00070.html * doc/extern-inline.texi (extern inline): Suggest checking that _GL_INLINE_HEADER_BEGIN is defined. * lib/acl-internal.h, lib/argp-fmtstream.h, lib/argp.h: * lib/binary-io.h, lib/bitrotate.h, lib/count-leading-zeros.h: * lib/count-one-bits.h, lib/eealloc.h, lib/execinfo.in.h: * lib/gethrxtime.h, lib/gl_list.h, lib/gl_oset.h, lib/gl_xlist.h: * lib/gl_xoset.h, lib/gl_xsublist.h, lib/glthread/cond.h: * lib/glthread/thread.h, lib/math.in.h, lib/mbchar.h, lib/mbfile.h: * lib/mbiter.h, lib/mbuiter.h, lib/openat.h, lib/pipe-filter-aux.h: * lib/priv-set.h, lib/pthread.in.h, lib/savewd.h, lib/se-context.in.h: * lib/se-selinux.in.h, lib/sig-handler.h, lib/stat-time.h: * lib/sys_socket.in.h, lib/timespec.h, lib/u64.h, lib/unistd.in.h: * lib/utimens.h, lib/wctype.in.h, lib/xalloc.h, lib/xsize.h: * lib/xtime.h: Check that _GL_INLINE_HEADER_BEGIN is defined.
* selinux-h: better 'inline'Paul Eggert2012-11-291-11/+18
| | | | | | | | | | | | | | | * lib/se-context.c, lib/se-selinux.c: New files. * lib/getfilecon.c (map_to_failure): Omit 'inline' for static function. * lib/se-context.in.h (SE_CONTEXT_INLINE): New macro. Replace all uses of 'static inline' with it. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * lib/se-selinux.in.h (SE_SELINUX_INLINE): New macro. Replace all uses of 'static inline' with it. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * modules/selinux-h (Files, lib_SOURCES): Add lib/se-context.c, lib/se-selinux.c. (Depends-on): Add extern-inline. (configure.ac): Do not require AC_C_INLINE.
* selinux-h: Make generated .h files standalone.Bruno Haible2009-12-251-11/+13
|
* gnulib-common: prefer _GL_UNUSED over _UNUSED_PARAMETER_Eric Blake2009-12-231-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are more contexts where __attribute__((__unused__)) is useful than just parameter lists. Also, naming the macro _GL_UNUSED fits with the recent addition of _GL_ARG_NONNULL. Preserve the name _UNUSED_PARAMETER_ for backwards-compatible use in external projects. * m4/gnulib-common.m4 (gl_COMMON): Create a more-appropriately named alias for __attribute__((__unused__)). * lib/chown.c: Update client. * lib/fchmodat.c: Likewise. * lib/fts.c: Likewise. * lib/getdate.y: Likewise. * lib/getgroups.c: Likewise. * lib/getopt.c: Likewise. * lib/getugroups.c: Likewise. * lib/mkdir.c: Likewise. * lib/mkfifo.c: Likewise. * lib/mkfifoat.c: Likewise. * lib/mknod.c: Likewise. * lib/mknodat.c: Likewise. * lib/readlink.c: Likewise. * lib/se-context.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/sockets.c: Likewise. * lib/symlink.c: Likewise. * lib/symlinkat.c: Likewise. * lib/unicodeio.c: Likewise. * lib/unistr.h: Likewise. * tests/test-areadlink.c: Likewise. * tests/test-areadlinkat.c: Likewise. * tests/test-filenamecat.c: Likewise. * tests/test-fseeko.c: Likewise. * tests/test-ftello.c: Likewise. * tests/test-getdate.c: Likewise. * tests/test-getgroups.c: Likewise. * tests/test-gethostname.c: Likewise. * tests/test-quotearg.c: Likewise. * tests/test-version-etc.c: Likewise. * tests/test-xalloc-die.c: Likewise. * tests/test-xfprintf-posix.c: Likewise. * tests/test-xprintf-posix.c: Likewise. * tests/test-xvasprintf.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-4/+4
|
* selinux-h: mark parameters of stub functions as intentionally unusedJim Meyering2008-10-231-7/+11
| | | | | * lib/se-selinux.in.h: Mark parameters as _UNUSED_PARAMETER_. * lib/se-context.in.h: Likewise.
* se-linux-h: remove ENOTSUPP-defining code; instead, use errnoJim Meyering2008-10-211-9/+0
| | | | | | | * modules/selinux-h (Depends-on): Add errno. (configure.ac): Add AC_REQUIRE([AC_C_INLINE]). * lib/se-context.in.h: Remove code to define ENOTSUPP. * lib/se-selinux.in.h: Likewise.
* selinux-h: new module (from coreutils/gl/)Jim Meyering2008-10-211-0/+31
* modules/selinux-h: New file. * lib/se-context.in.h: New file. * lib/se-selinux.in.h: New file. * m4/selinux-context-h.m4: New file. * m4/selinux-selinux-h.m4: New file.