#[doc(hidden)]
#[macro_export]
macro_rules! bpf_library_license
{
($license_text: expr $(, $license_array: expr)*) =>
{
#[no_mangle]
#[link_section = "license"]
pub static _license: [u8; 4] = [$($license_array, )*0];
}
}
#[doc(hidden)]
#[macro_export]
macro_rules! bpf_library_license_match
{
("AGPL-3.0") =>
{
bpf_library_license!(AGPL-3.0, 65, 71, 80, 76, 45, 51, 46, 48);
};
("GPL") =>
{
bpf_library_license!(GPL, 71, 80, 76);
};
("MIT") =>
{
bpf_library_license!(MIT, 77, 73, 84);
};
}
#[macro_export]
macro_rules! bpf_library
{
($license_text: tt) =>
{
bpf_library_license_match!($license_text);
#[no_mangle]
#[link_section = "version"]
pub static _version: u32 = 0xFFFFFFFE;
}
}