summaryrefslogtreecommitdiffstats
path: root/vendor/libloading/src
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libloading/src')
-rw-r--r--vendor/libloading/src/changelog.rs9
-rw-r--r--vendor/libloading/src/os/unix/consts.rs7
-rw-r--r--vendor/libloading/src/os/unix/mod.rs4
-rw-r--r--vendor/libloading/src/os/windows/mod.rs6
4 files changed, 18 insertions, 8 deletions
diff --git a/vendor/libloading/src/changelog.rs b/vendor/libloading/src/changelog.rs
index f8b898e6c..162544f34 100644
--- a/vendor/libloading/src/changelog.rs
+++ b/vendor/libloading/src/changelog.rs
@@ -1,5 +1,12 @@
//! The change log.
+/// Release 0.7.4 (2022-11-07)
+///
+/// This release has no functional changes.
+///
+/// `RTLD_LAZY`, `RTLD_GLOBAL` and `RTLD_LOCAL` constants have been implemented for AIX platforms.
+pub mod r0_7_4 {}
+
/// Release 0.7.3 (2022-01-15)
///
/// This release has no functional changes.
@@ -198,7 +205,7 @@ pub mod r0_6_1 {}
/// Release 0.6.0 (2020-04-05)
///
/// * Introduced a new method [`os::unix::Library::get_singlethreaded`];
-/// * Added (untested) support for building when targetting Redox and Fuchsia;
+/// * Added (untested) support for building when targeting Redox and Fuchsia;
/// * The APIs exposed by this library no longer panic and instead return an `Err` when it used
/// to panic.
///
diff --git a/vendor/libloading/src/os/unix/consts.rs b/vendor/libloading/src/os/unix/consts.rs
index dbe4df972..ea7a6a102 100644
--- a/vendor/libloading/src/os/unix/consts.rs
+++ b/vendor/libloading/src/os/unix/consts.rs
@@ -60,6 +60,8 @@ mod posix {
cfg_if! {
if #[cfg(target_os = "haiku")] {
pub(super) const RTLD_LAZY: c_int = 0;
+ } else if #[cfg(target_os = "aix")] {
+ pub(super) const RTLD_LAZY: c_int = 4;
} else if #[cfg(any(
target_os = "linux",
target_os = "android",
@@ -104,6 +106,7 @@ mod posix {
target_os = "openbsd",
target_os = "netbsd",
+ target_os = "aix",
target_os = "solaris",
target_os = "illumos",
@@ -129,6 +132,8 @@ mod posix {
all(target_os = "android",target_pointer_width = "32"),
))] {
pub(super) const RTLD_GLOBAL: c_int = 2;
+ } else if #[cfg(target_os = "aix")] {
+ pub(super) const RTLD_GLOBAL: c_int = 0x10000;
} else if #[cfg(any(
target_env = "uclibc",
all(target_os = "linux", target_arch = "mips"),
@@ -169,6 +174,8 @@ mod posix {
cfg_if! {
if #[cfg(target_os = "netbsd")] {
pub(super) const RTLD_LOCAL: c_int = 0x200;
+ } else if #[cfg(target_os = "aix")] {
+ pub(super) const RTLD_LOCAL: c_int = 0x80000;
} else if #[cfg(any(
target_os = "macos",
target_os = "ios",
diff --git a/vendor/libloading/src/os/unix/mod.rs b/vendor/libloading/src/os/unix/mod.rs
index fd0777eab..df7efdad5 100644
--- a/vendor/libloading/src/os/unix/mod.rs
+++ b/vendor/libloading/src/os/unix/mod.rs
@@ -365,9 +365,7 @@ pub struct Symbol<T> {
impl<T> Symbol<T> {
/// Convert the loaded `Symbol` into a raw pointer.
pub fn into_raw(self) -> *mut raw::c_void {
- let pointer = self.pointer;
- mem::forget(self);
- pointer
+ self.pointer
}
}
diff --git a/vendor/libloading/src/os/windows/mod.rs b/vendor/libloading/src/os/windows/mod.rs
index eadeb6980..e3da940a2 100644
--- a/vendor/libloading/src/os/windows/mod.rs
+++ b/vendor/libloading/src/os/windows/mod.rs
@@ -307,7 +307,7 @@ impl fmt::Debug for Library {
let mut buf =
mem::MaybeUninit::<[mem::MaybeUninit::<WCHAR>; 1024]>::uninit().assume_init();
let len = libloaderapi::GetModuleFileNameW(self.0,
- (&mut buf[..]).as_mut_ptr().cast(), 1024) as usize;
+ buf[..].as_mut_ptr().cast(), 1024) as usize;
if len == 0 {
f.write_str(&format!("Library@{:p}", self.0))
} else {
@@ -333,9 +333,7 @@ pub struct Symbol<T> {
impl<T> Symbol<T> {
/// Convert the loaded `Symbol` into a handle.
pub fn into_raw(self) -> FARPROC {
- let pointer = self.pointer;
- mem::forget(self);
- pointer
+ self.pointer
}
}