Merge pull request #2021 from RustPython/fix-mingw

Fix compilation on mingw/msys
This commit is contained in:
Jeong YunWon authored and GitHub committed 2020-07-23 02:55:23 +09:00
commit 87e500a07b
1 file changed
+5 -5
+5 -5
View File
@@ -1413,7 +1413,7 @@ pub type Offset = libc::off_t;
#[cfg(windows)]
pub type Offset = libc::c_longlong;
#[cfg(windows)]
#[cfg(all(windows, target_env = "msvc"))]
type InvalidParamHandler = extern "C" fn(
*const libc::wchar_t,
*const libc::wchar_t,
@@ -1421,7 +1421,7 @@ type InvalidParamHandler = extern "C" fn(
libc::c_uint,
libc::uintptr_t,
);
#[cfg(windows)]
#[cfg(all(windows, target_env = "msvc"))]
extern "C" {
#[doc(hidden)]
pub fn _set_thread_local_invalid_parameter_handler(
@@ -1429,7 +1429,7 @@ extern "C" {
) -> InvalidParamHandler;
}
#[cfg(windows)]
#[cfg(all(windows, target_env = "msvc"))]
#[doc(hidden)]
pub extern "C" fn silent_iph_handler(
_: *const libc::wchar_t,
@@ -1443,7 +1443,7 @@ pub extern "C" fn silent_iph_handler(
#[macro_export]
macro_rules! suppress_iph {
($e:expr) => {{
#[cfg(windows)]
#[cfg(all(windows, target_env = "msvc"))]
{
let old = $crate::stdlib::os::_set_thread_local_invalid_parameter_handler(
$crate::stdlib::os::silent_iph_handler,
@@ -1452,7 +1452,7 @@ macro_rules! suppress_iph {
$crate::stdlib::os::_set_thread_local_invalid_parameter_handler(old);
ret
}
#[cfg(not(windows))]
#[cfg(not(all(windows, target_env = "msvc")))]
{
$e
}