[PATCH 2/2] crypt.3, encrypt.3: Add notes about _XOPEN_CRYPT.
Rical Jasan
rj@2c3t.io
Sat Apr 14 04:43:00 GMT 2018
On 04/12/2018 12:05 PM, Carlos O'Donell wrote:
> diff --git a/man3/crypt.3 b/man3/crypt.3
> index 3e6552ad8..58c62d93d 100644
> --- a/man3/crypt.3
> +++ b/man3/crypt.3
> @@ -188,8 +188,26 @@ POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
> .BR crypt_r ()
> is a GNU extension.
> .SH NOTES
> -.SS Glibc notes
> -The glibc2 version of this function supports additional
> +.SS Availability in glibc
> +The
> +.BR crypt (),
> +.BR encrypt (),
> +and
> +.BR setkey ()
> +functions are part of the POSIX.1-2008 XSI Options Group for Encryption
> +and are optional. If the interfaces are not available then the symbolic
> +constant
> +.BR _XOPEN_CRYPT
> +is either not defined or defined to -1, and can be checked at runtime with
> +.BR sysconf ().
> +This may be the case if the downstream distribution has switched from glibc
> +crypt to libxcrypt. When recompiling applications in such distributions the
> +user must detect if
> +.BR _XOPEN_CRPYT
"CRYPT"
(Looks like this was caught already.)
> +is not available and include crypt.h for the function prototypes; otherwise
> +libxcrypt is a ABI compatible drop-in replacement.
"an ABI"
I would also hyphenate "ABI-compatible".
(The same issues were also in encrypt.3 but it sounds like the content
was deduplicated already.)
Rical
More information about the Libc-alpha
mailing list