errno-h: document Haiku errors can’t be -1
[gnulib.git] / doc / glibc-functions / getfilecon-desc.texi
blob29ec4335cbc9aee4bd24b523ddf69cd72293c902
1 @macro getfileconDesc{fn}
2 Gnulib module: selinux-h
3 @mindex selinux-h
5 Portability problems fixed by Gnulib:
6 @itemize
7 @item
8 This function exists only on Linux and is therefore
9 missing on all non-glibc platforms:
10 macOS 14, FreeBSD 14.0, NetBSD 10.0, OpenBSD 7.5, Minix 3.1.8, AIX 7.1, HP-UX 11.31, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
11 On those platforms, this module provides a stub that always sets
12 @code{errno} to @code{ENOTSUP} and returns @samp{-1}.
13 @item
14 On systems with SELinux support, this module provides a wrapper for the
15 @code{\fn\} function that insulates the caller from API-nonconforming behavior.
16 Without this wrapper, @code{\fn\} can return @samp{0} and set
17 the @code{context} pointer to NULL, and in another scenario can return
18 @samp{10} and set the @code{context} pointer to @samp{unlabeled}.
19 This wrapper returns @samp{-1} in each case and sets @code{errno} to
20 @code{ENOTSUP} and @code{ENODATA} respectively.
21 While the conditions that can provoke such behavior are rare, the
22 average caller does not handle them because the possibility of such
23 behavior is not documented.
24 @end itemize
26 Portability problems not fixed by Gnulib:
27 @itemize
28 @end itemize
29 @end macro