Mercurial > crates > nonstick
comparison libpam-sys/libpam-sys-consts/src/lib.rs @ 161:e9354e655f38
Improve PAM detection docs.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 13 Jul 2025 16:06:51 -0400 |
parents | ab8020566cd9 |
children |
comparison
equal
deleted
inserted
replaced
160:09dff285ff5e | 161:e9354e655f38 |
---|---|
12 /// | 12 /// |
13 /// ## Compile time | 13 /// ## Compile time |
14 /// | 14 /// |
15 /// Use [`enable_pam_impl_cfg`] in your `build.rs` to generate custom `#[cfg]`s | 15 /// Use [`enable_pam_impl_cfg`] in your `build.rs` to generate custom `#[cfg]`s |
16 /// for conditional compilation based on PAM implementation. | 16 /// for conditional compilation based on PAM implementation. |
17 /// | |
18 /// ``` | |
19 /// // Your package's build.rs: | |
20 /// | |
21 /// use libpam_sys_consts::pam_impl; | |
22 /// // also available at libpam_sys::pam_impl | |
23 /// | |
24 /// fn main() { | |
25 /// pam_impl::enable_pam_impl_cfg(); | |
26 /// // whatever else you do in your build script. | |
27 /// } | |
28 /// ``` | |
17 /// | 29 /// |
18 /// This will set the current `pam_impl` as well as registering all known | 30 /// This will set the current `pam_impl` as well as registering all known |
19 /// PAM implementations with `rustc-check-cfg` to get cfg-checking. | 31 /// PAM implementations with `rustc-check-cfg` to get cfg-checking. |
20 /// | 32 /// |
21 /// The names that appear in the `cfg` variables are the same as the values | 33 /// The names that appear in the `cfg` variables are the same as the values |