Skip to content

Rollup of 9 pull requests #67414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d419a5f
Fix pointing at arg when cause is outside of call
VirrageS Dec 1, 2019
e305bf8
Rename tests and add short test description
VirrageS Dec 3, 2019
3594d8b
make htons const fn
tesuji Dec 15, 2019
6ad0b55
Remove now-redundant range check on u128 -> f32 casts
Dec 15, 2019
720b865
[mir-opt] Fix `Inline` pass to handle inlining into `box` expressions
wesleywiser Dec 15, 2019
b50cee3
Move the rest of the mir-opt inline tests into a folder
wesleywiser Dec 15, 2019
aa0ef5a
Fix handling of wasm import modules and names
alexcrichton Dec 16, 2019
e77a55b
Remove outdated references to @T from comments
Dec 17, 2019
71278cb
Remove some unnecessary `ATTR_*` constants.
nnethercote Oct 28, 2019
5891025
Remove `SO_NOSIGPIPE` dummy variable on platforms that don't use it.
reitermarkus Dec 18, 2019
9ce7f80
Allow -Cllvm-args to override rustc's default LLVM args.
michaelwoerister Dec 18, 2019
58352fd
Remove rarely used -Zdisable_instrumentation_preinliner flag.
michaelwoerister Dec 18, 2019
0595fd8
Rollup merge of #67321 - lzutao:htons, r=dtolnay
Mark-Simulacrum Dec 19, 2019
c4fba08
Rollup merge of #67328 - rkruppe:simplify-u128-f32-cast, r=matthewjasper
Mark-Simulacrum Dec 19, 2019
ddd256b
Rollup merge of #67333 - wesleywiser:fix_inline_into_box_place, r=oli…
Mark-Simulacrum Dec 19, 2019
a12ec2e
Rollup merge of #67354 - VirrageS:blame-wrong-line, r=estebank
Mark-Simulacrum Dec 19, 2019
74b1902
Rollup merge of #67363 - alexcrichton:wasm-import-modules, r=eddyb
Mark-Simulacrum Dec 19, 2019
850bd7b
Rollup merge of #67382 - nnethercote:rm-unnecessary-ATTR-constants, r…
Mark-Simulacrum Dec 19, 2019
821dcb9
Rollup merge of #67389 - reitermarkus:dummy-variable, r=shepmaster
Mark-Simulacrum Dec 19, 2019
2d71753
Rollup merge of #67393 - michaelwoerister:llvm-args-override, r=varkor
Mark-Simulacrum Dec 19, 2019
744cd06
Rollup merge of #67394 - matthew-healy:update-libsyntax-ptr-docs, r=D…
Mark-Simulacrum Dec 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions src/libstd/sys/unix/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ use libc::SOCK_CLOEXEC;
#[cfg(not(target_os = "linux"))]
const SOCK_CLOEXEC: c_int = 0;

// Another conditional constant for name resolution: Macos et iOS use
// SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket.
// Other platforms do otherwise.
#[cfg(target_vendor = "apple")]
use libc::SO_NOSIGPIPE;
#[cfg(not(target_vendor = "apple"))]
const SO_NOSIGPIPE: c_int = 0;

pub struct Socket(FileDesc);

pub fn init() {}
Expand Down Expand Up @@ -89,9 +81,12 @@ impl Socket {
let fd = FileDesc::new(fd);
fd.set_cloexec()?;
let socket = Socket(fd);
if cfg!(target_vendor = "apple") {
setsockopt(&socket, libc::SOL_SOCKET, SO_NOSIGPIPE, 1)?;
}

// macOS and iOS use `SO_NOSIGPIPE` as a `setsockopt`
// flag to disable `SIGPIPE` emission on socket.
#[cfg(target_vendor = "apple")]
setsockopt(&socket, libc::SOL_SOCKET, libc::SO_NOSIGPIPE, 1)?;

Ok(socket)
}
}
Expand Down
1 change: 0 additions & 1 deletion src/libstd/sys/vxworks/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub extern crate libc as netc;
pub type wrlen_t = size_t;

const SOCK_CLOEXEC: c_int = 0;
const SO_NOSIGPIPE: c_int = 0;

pub struct Socket(FileDesc);

Expand Down