Mercurial > crates > nonstick
comparison libpam-sys/src/lib.rs @ 108:e97534be35e3
Make some proc macros for doing cfg-like stuff for PAM impls.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sat, 28 Jun 2025 00:34:45 -0400 |
parents | 49d9e2b5c189 |
children | bb465393621f |
comparison
equal
deleted
inserted
replaced
107:49c6633f6fd2 | 108:e97534be35e3 |
---|---|
1 #![doc = include_str!("../README.md")] | 1 #![doc = include_str!("../README.md")] |
2 //! | 2 //! |
3 //! ## Version info | 3 //! ## PAM implementation |
4 //! | 4 //! |
5 //! This documentation was built with the following configuration: | 5 #![doc = concat!("This documentation was built for the **", pam_impl_name!(), "** implementation.")] |
6 //! | 6 |
7 #![cfg_attr(pam_impl = "illumos", doc = "- PAM implementation: Illumos")] | |
8 #![cfg_attr(pam_impl = "linux-pam", doc = "- PAM implementation: Linux-PAM")] | |
9 #![cfg_attr(pam_impl = "openpam", doc = "- PAM implementation: OpenPAM")] | |
10 //! | |
11 #![cfg_attr(feature = "basic-ext", doc = "- Includes common extensions")] | |
12 #![cfg_attr(feature = "linux-pam-ext", doc = "- Includes Linux-PAM extensions")] | |
13 #![cfg_attr(feature = "openpam-ext", doc = "- Includes OpenPAM extensions")] | |
14 #![cfg_attr( | |
15 feature = "use-system-headers", | |
16 doc = "- Built with system header files" | |
17 )] | |
18 mod constants; | 7 mod constants; |
8 | |
9 libpam_sys_impls::pam_impl_enum!(); | |
10 | |
11 #[doc(inline)] | |
12 pub use libpam_sys_impls::{cfg_pam_impl, pam_impl_name}; | |
13 | |
19 pub mod helpers; | 14 pub mod helpers; |
20 | 15 |
21 #[doc(inline)] | 16 #[doc(inline)] |
22 pub use constants::*; | 17 pub use constants::*; |
18 | |
19 #[cfg(test)] | |
20 mod tests { | |
21 #[test] | |
22 fn test() { | |
23 panic!("The pam impl is {:?}", super::LIBPAMSYS_IMPL); | |
24 } | |
25 } |