about summary refs log tree commit diff
path: root/src/rt/rust_run_program.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-09-17 14:45:50 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-18 20:58:56 -0700
commitc3ad785d83b583ad693424d9f0f993e36f0990f5 (patch)
tree1b9cf46667406d5f9d5ef03dd6b79b3dcc6fc0b0 /src/rt/rust_run_program.cpp
parent29cdf58861b1054c899c911343ccd8b1af28151a (diff)
downloadrust-c3ad785d83b583ad693424d9f0f993e36f0990f5.tar.gz
rust-c3ad785d83b583ad693424d9f0f993e36f0990f5.zip
Remove rust_run_program.cpp
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
Diffstat (limited to 'src/rt/rust_run_program.cpp')
-rw-r--r--src/rt/rust_run_program.cpp71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/rt/rust_run_program.cpp b/src/rt/rust_run_program.cpp
deleted file mode 100644
index 25cbaf822f0..00000000000
--- a/src/rt/rust_run_program.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-#include "rust_globals.h"
-
-#ifdef __APPLE__
-#include <crt_externs.h>
-#endif
-
-#if defined(__WIN32__)
-
-extern "C" CDECL void
-rust_unset_sigprocmask() {
-    // empty stub for windows to keep linker happy
-}
-
-extern "C" CDECL void
-rust_set_environ(void* envp) {
-    // empty stub for windows to keep linker happy
-}
-
-#elif defined(__GNUC__)
-
-#include <signal.h>
-#include <unistd.h>
-
-#ifdef __FreeBSD__
-extern char **environ;
-#endif
-
-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);
-}
-
-extern "C" CDECL void
-rust_set_environ(void* envp) {
-    // FIXME: this could actually be converted to rust (see issue #2674)
-#ifdef __APPLE__
-    *_NSGetEnviron() = (char **) envp;
-#else
-    environ = (char **) envp;
-#endif
-}
-
-#else
-#error "Platform not supported."
-#endif
-
-//
-// Local Variables:
-// mode: C++
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
-// End:
-//