Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
Conflicts:
	src/libstd/sys/unix/process.rs
  • Loading branch information
ejjeong committed Feb 4, 2015
2 parents 0b8f6f9 + 3b2ed14 commit 49a520c
Show file tree
Hide file tree
Showing 1,186 changed files with 13,188 additions and 12,115 deletions.
20 changes: 4 additions & 16 deletions COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ The following third party packages are included, and carry
their own copyright notices and license terms:

* Two header files that are part of the Valgrind
package. These files are found at src/rt/vg/valgrind.h and
src/rt/vg/memcheck.h, within this distribution. These files
package. These files are found at src/rt/valgrind/valgrind.h and
src/rt/valgrind/memcheck.h, within this distribution. These files
are redistributed under the following terms, as noted in
them:

for src/rt/vg/valgrind.h:
for src/rt/valgrind/valgrind.h:

This file is part of Valgrind, a dynamic binary
instrumentation framework.
Expand Down Expand Up @@ -74,7 +74,7 @@ their own copyright notices and license terms:
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

for src/rt/vg/memcheck.h:
for src/rt/valgrind/memcheck.h:

This file is part of MemCheck, a heavyweight Valgrind
tool for detecting memory errors.
Expand Down Expand Up @@ -120,18 +120,6 @@ their own copyright notices and license terms:
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

* The auxiliary file src/etc/pkg/modpath.iss contains a
library routine compiled, by Inno Setup, into the Windows
installer binary. This file is licensed under the LGPL,
version 3, but, in our legal interpretation, this does not
affect the aggregate "collected work" license of the Rust
distribution (MIT/ASL2) nor any other components of it. We
believe that the terms governing distribution of the
binary Windows installer built from modpath.iss are
therefore LGPL, but not the terms governing distribution
of any of the files installed by such an installer (such
as the Rust compiler or runtime libraries themselves).

* The src/rt/miniz.c file, carrying an implementation of
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
<richgel99@gmail.com>. All uses of this file are
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ There is a lot more documentation in the [wiki].

The Rust community congregates in a few places:

* [StackOverflow] - Get help here.
* [/r/rust] - General discussion.
* [StackOverflow] - Direct questions about using the language here.
* [users.rust-lang.org] - General discussion, broader questions.
* [internals.rust-lang.org] - For development of the Rust language itself.
* [/r/rust] - News and general discussion.

[StackOverflow]: http://stackoverflow.com/questions/tagged/rust
[/r/rust]: http://reddit.com/r/rust
[users.rust-lang.org]: http://users.rust-lang.org/
[internals.rust-lang.org]: http://internals.rust-lang.org/

## License
Expand Down
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ case $CFG_OSTYPE in
CFG_OSTYPE=unknown-dragonfly
;;

OpenBSD)
CFG_OSTYPE=unknown-openbsd
;;

Darwin)
CFG_OSTYPE=apple-darwin
;;
Expand Down
26 changes: 26 additions & 0 deletions mk/cfg/x86_64-unknown-openbsd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# x86_64-pc-openbsd-elf configuration
CC_x86_64-unknown-openbsd=$(CC)
CXX_x86_64-unknown-openbsd=$(CXX)
CPP_x86_64-unknown-openbsd=$(CPP)
AR_x86_64-unknown-openbsd=$(AR)
CFG_LIB_NAME_x86_64-unknown-openbsd=lib$(1).so
CFG_STATIC_LIB_NAME_x86_64-unknown-openbsd=lib$(1).a
CFG_LIB_GLOB_x86_64-unknown-openbsd=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_x86_64-unknown-openbsd=$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_x86_64-unknown-openbsd := -m64 -I/usr/include $(CFLAGS)
CFG_GCCISH_CFLAGS_x86_64-unknown-openbsd := -Wall -Werror -g -fPIC -m64 -I/usr/include $(CFLAGS)
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-openbsd := -shared -fPIC -g -pthread -m64
CFG_GCCISH_DEF_FLAG_x86_64-unknown-openbsd := -Wl,--export-dynamic,--dynamic-list=
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-openbsd := -Wl,-whole-archive
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-openbsd := -Wl,-no-whole-archive
CFG_DEF_SUFFIX_x86_64-unknown-openbsd := .bsd.def
CFG_LLC_FLAGS_x86_64-unknown-openbsd :=
CFG_INSTALL_NAME_x86_64-unknown-openbsd =
CFG_EXE_SUFFIX_x86_64-unknown-openbsd :=
CFG_WINDOWSY_x86_64-unknown-openbsd :=
CFG_UNIXY_x86_64-unknown-openbsd := 1
CFG_PATH_MUNGE_x86_64-unknown-openbsd :=
CFG_LDPATH_x86_64-unknown-openbsd :=
CFG_RUN_x86_64-unknown-openbsd=$(2)
CFG_RUN_TARG_x86_64-unknown-openbsd=$(call CFG_RUN_x86_64-unknown-openbsd,,$(2))
CFG_GNU_TRIPLE_x86_64-unknown-openbsd := x86_64-unknown-openbsd
21 changes: 11 additions & 10 deletions src/compiletest/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ pub enum Mode {
}

impl FromStr for Mode {
fn from_str(s: &str) -> Option<Mode> {
type Err = ();
fn from_str(s: &str) -> Result<Mode, ()> {
match s {
"compile-fail" => Some(CompileFail),
"run-fail" => Some(RunFail),
"run-pass" => Some(RunPass),
"run-pass-valgrind" => Some(RunPassValgrind),
"pretty" => Some(Pretty),
"debuginfo-lldb" => Some(DebugInfoLldb),
"debuginfo-gdb" => Some(DebugInfoGdb),
"codegen" => Some(Codegen),
_ => None,
"compile-fail" => Ok(CompileFail),
"run-fail" => Ok(RunFail),
"run-pass" => Ok(RunPass),
"run-pass-valgrind" => Ok(RunPassValgrind),
"pretty" => Ok(Pretty),
"debuginfo-lldb" => Ok(DebugInfoLldb),
"debuginfo-gdb" => Ok(DebugInfoGdb),
"codegen" => Ok(Codegen),
_ => Err(()),
}
}
}
Expand Down
39 changes: 18 additions & 21 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
// except according to those terms.

#![crate_type = "bin"]
#![allow(unknown_features)]
#![feature(slicing_syntax, unboxed_closures)]

#![feature(box_syntax)]
#![feature(collections)]
#![feature(core)]
#![feature(int_uint)]
#![feature(test)]
#![feature(rustc_private)]
#![feature(std_misc)]
#![feature(path)]
#![feature(io)]
#![feature(core)]
#![feature(collections)]
#![feature(os)]
#![feature(path)]
#![feature(rustc_private)]
#![feature(slicing_syntax, unboxed_closures)]
#![feature(std_misc)]
#![feature(test)]
#![feature(unicode)]
#![feature(env)]

#![allow(unstable)]
#![deny(warnings)]

extern crate test;
Expand All @@ -32,10 +32,9 @@ extern crate getopts;
#[macro_use]
extern crate log;

use std::os;
use std::env;
use std::old_io;
use std::old_io::fs;
use std::str::FromStr;
use std::thunk::Thunk;
use getopts::{optopt, optflag, reqopt};
use common::Config;
Expand All @@ -50,7 +49,7 @@ pub mod common;
pub mod errors;

pub fn main() {
let args = os::args();
let args = env::args().map(|s| s.into_string().unwrap()).collect();;
let config = parse_config(args);

if config.valgrind_path.is_none() && config.force_valgrind {
Expand Down Expand Up @@ -140,9 +139,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
build_base: opt_path(matches, "build-base"),
aux_base: opt_path(matches, "aux-base"),
stage_id: matches.opt_str("stage-id").unwrap(),
mode: FromStr::from_str(matches.opt_str("mode")
.unwrap()
.as_slice()).expect("invalid mode"),
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
run_ignored: matches.opt_present("ignored"),
filter: filter,
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
Expand Down Expand Up @@ -231,15 +228,15 @@ pub fn run_tests(config: &Config) {
// android debug-info test uses remote debugger
// so, we test 1 task at once.
// also trying to isolate problems with adb_run_wrapper.sh ilooping
os::setenv("RUST_TEST_TASKS","1");
env::set_var("RUST_TEST_TASKS","1");
}

match config.mode {
DebugInfoLldb => {
// Some older versions of LLDB seem to have problems with multiple
// instances running in parallel, so only run one test task at a
// time.
os::setenv("RUST_TEST_TASKS", "1");
env::set_var("RUST_TEST_TASKS", "1");
}
_ => { /* proceed */ }
}
Expand All @@ -252,7 +249,7 @@ pub fn run_tests(config: &Config) {
old_io::test::raise_fd_limit();
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
os::setenv("__COMPAT_LAYER", "RunAsInvoker");
env::set_var("__COMPAT_LAYER", "RunAsInvoker");
let res = test::run_tests_console(&opts, tests.into_iter().collect());
match res {
Ok(true) => {}
Expand Down Expand Up @@ -283,7 +280,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
config.src_base.display());
let mut tests = Vec::new();
let dirs = fs::readdir(&config.src_base).unwrap();
for file in dirs.iter() {
for file in &dirs {
let file = file.clone();
debug!("inspecting file {:?}", file.display());
if is_test(config, &file) {
Expand Down Expand Up @@ -311,13 +308,13 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {

let mut valid = false;

for ext in valid_extensions.iter() {
for ext in &valid_extensions {
if name.ends_with(ext.as_slice()) {
valid = true;
}
}

for pre in invalid_prefixes.iter() {
for pre in &invalid_prefixes {
if name.starts_with(pre.as_slice()) {
valid = false;
}
Expand Down
10 changes: 5 additions & 5 deletions src/compiletest/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
.collect();

match strs.len() {
1u => (strs.pop().unwrap(), "".to_string()),
2u => {
1 => (strs.pop().unwrap(), "".to_string()),
2 => {
let end = strs.pop().unwrap();
(strs.pop().unwrap(), end)
}
Expand Down Expand Up @@ -352,8 +352,8 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
panic!("{}", error_string);
}

let major: int = components[0].parse().expect(error_string);
let minor: int = components[1].parse().expect(error_string);
let major: int = components[0].parse().ok().expect(error_string);
let minor: int = components[1].parse().ok().expect(error_string);

return major * 1000 + minor;
}
Expand All @@ -363,6 +363,6 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
"Encountered LLDB version string with unexpected format: {}",
version_string);
let error_string = error_string.as_slice();
let major: int = version_string.parse().expect(error_string);
let major: int = version_string.parse().ok().expect(error_string);
return major;
}
8 changes: 4 additions & 4 deletions src/compiletest/procsrv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ pub fn run(lib_path: &str,
let mut cmd = Command::new(prog);
cmd.args(args);
add_target_env(&mut cmd, lib_path, aux_path);
for (key, val) in env.into_iter() {
for (key, val) in env {
cmd.env(key, val);
}

match cmd.spawn() {
Ok(mut process) => {
for input in input.iter() {
if let Some(input) = input {
process.stdin.as_mut().unwrap().write_all(input.as_bytes()).unwrap();
}
let ProcessOutput { status, output, error } =
Expand All @@ -72,13 +72,13 @@ pub fn run_background(lib_path: &str,
let mut cmd = Command::new(prog);
cmd.args(args);
add_target_env(&mut cmd, lib_path, aux_path);
for (key, val) in env.into_iter() {
for (key, val) in env {
cmd.env(key, val);
}

match cmd.spawn() {
Ok(mut process) => {
for input in input.iter() {
if let Some(input) = input {
process.stdin.as_mut().unwrap().write_all(input.as_bytes()).unwrap();
}

Expand Down
Loading

0 comments on commit 49a520c

Please sign in to comment.