Fix open_library macros on linux32

This commit is contained in:
William Venner 2021-09-22 04:18:34 +01:00
parent be444b8d52
commit 0148e6df88
3 changed files with 10 additions and 2 deletions

2
Cargo.lock generated
View File

@ -68,7 +68,7 @@ dependencies = [
[[package]]
name = "gmod"
version = "2.0.0"
version = "2.0.1"
dependencies = [
"cstr",
"ctor",

View File

@ -1,6 +1,6 @@
[package]
name = "gmod"
version = "2.0.0"
version = "2.0.1"
authors = ["William Venner <william@venner.io>"]
edition = "2018"
license = "MIT"

View File

@ -80,8 +80,12 @@ macro_rules! open_library_srv {
.or_else(|_| $crate::open_library_raw!("bin/linux32/lib", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("bin/", $name, "_srv.so"))
.or_else(|_| $crate::open_library_raw!("bin/lib", $name, "_srv.so"))
.or_else(|_| $crate::open_library_raw!("garrysmod/bin/", $name, "_srv.so"))
.or_else(|_| $crate::open_library_raw!("garrysmod/bin/lib", $name, "_srv.so"))
.or_else(|_| $crate::open_library_raw!("bin/", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("bin/lib", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("garrysmod/bin/", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("garrysmod/bin/lib", $name, ".so"))
}
}};
}
@ -119,8 +123,12 @@ macro_rules! open_library {
.or_else(|_| $crate::open_library_raw!("bin/linux32/lib", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("bin/", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("bin/lib", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("garrysmod/bin/", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("garrysmod/bin/lib", $name, ".so"))
.or_else(|_| $crate::open_library_raw!("bin/", $name, "_srv.so"))
.or_else(|_| $crate::open_library_raw!("bin/lib", $name, "_srv.so"))
.or_else(|_| $crate::open_library_raw!("garrysmod/bin/", $name, "_srv.so"))
.or_else(|_| $crate::open_library_raw!("garrysmod/bin/lib", $name, "_srv.so"))
}
}};
}