Mercurial > crates > nonstick
comparison libpam-sys/build.rs @ 131:a632a8874131
Get all the Linux-PAM functions into libpam-sys, and get tests right.
| author | Paul Fisher <paul@pfish.zone> |
|---|---|
| date | Wed, 02 Jul 2025 02:24:21 -0400 |
| parents | 80c07e5ab22f |
| children | 6c1e1bdb4164 |
comparison
equal
deleted
inserted
replaced
| 130:80c07e5ab22f | 131:a632a8874131 |
|---|---|
| 6 fn main() { | 6 fn main() { |
| 7 println!("cargo:rustc-link-lib=pam"); | 7 println!("cargo:rustc-link-lib=pam"); |
| 8 let pam_impl_strs: Vec<_> = PamImpl::iter().map(|e| format!("\"{:?}\"", e)).collect(); | 8 let pam_impl_strs: Vec<_> = PamImpl::iter().map(|e| format!("\"{:?}\"", e)).collect(); |
| 9 let pam_impls = pam_impl_strs.join(","); | 9 let pam_impls = pam_impl_strs.join(","); |
| 10 // We use this for ctest. Don't do what we've done; just use cfg_pam_impl. | 10 // We use this for ctest. Don't do what we've done; just use cfg_pam_impl. |
| 11 println!("cargo:rustc-check-cfg=cfg(_private_pam_impl_hack, values({pam_impls}))"); | 11 println!("cargo:rustc-check-cfg=cfg(_hack_impl, values({pam_impls}))"); |
| 12 println!( | 12 println!("cargo:rustc-cfg=_hack_impl=\"{:?}\"", PamImpl::CURRENT); |
| 13 "cargo:rustc-cfg=_private_pam_impl_hack=\"{:?}\"", | |
| 14 PamImpl::CURRENT | |
| 15 ); | |
| 16 } | 13 } |
