diff options
| author | bors <bors@rust-lang.org> | 2013-09-18 22:15:59 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-18 22:15:59 -0700 |
| commit | 3c0013134cecbe9592f02ed5c6a94c06effb19d4 (patch) | |
| tree | 4c4db2e7638a0b3549108ff2aa9692ba5f6c826f /src/rt/rust_builtin.cpp | |
| parent | 4dacd736510b2ae28a54489fe88571f1a6de019f (diff) | |
| parent | c3ad785d83b583ad693424d9f0f993e36f0990f5 (diff) | |
| download | rust-3c0013134cecbe9592f02ed5c6a94c06effb19d4.tar.gz rust-3c0013134cecbe9592f02ed5c6a94c06effb19d4.zip | |
auto merge of #9280 : alexcrichton/rust/less-c++, r=brson
Some of the functions could be converted to rust, but the functions dealing with signals were moved to rust_builtin.cpp instead (no reason to keep the original file around for one function). Closes #2674 Because less C++ is better C++!
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 4b718303f2c..8877b082588 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -643,6 +643,29 @@ rust_valgrind_stack_deregister(unsigned int id) { VALGRIND_STACK_DEREGISTER(id); } +#if defined(__WIN32__) + +extern "C" CDECL void +rust_unset_sigprocmask() { + // empty stub for windows to keep linker happy +} + +#else + +#include <signal.h> +#include <unistd.h> + +extern "C" CDECL void +rust_unset_sigprocmask() { + // this can't be safely converted to rust code because the + // representation of sigset_t is platform-dependent + sigset_t sset; + sigemptyset(&sset); + sigprocmask(SIG_SETMASK, &sset, NULL); +} + +#endif + // // Local Variables: // mode: C++ |
