about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLuqman Aden <laden@csclub.uwaterloo.ca>2013-11-20 01:30:51 -0500
committerLuqman Aden <laden@csclub.uwaterloo.ca>2013-11-22 20:39:58 -0500
commit6820ed4dcfe90136fb49e88fc44b0326035ac4c8 (patch)
tree7ee0f76dedf75e82cfc80ff87ef4abd69f75e6fe /src
parentcd9069ca734fe89fe446c16dc821e54b973506f5 (diff)
downloadrust-6820ed4dcfe90136fb49e88fc44b0326035ac4c8.tar.gz
rust-6820ed4dcfe90136fb49e88fc44b0326035ac4c8.zip
Fix up mingw64 target.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/driver/driver.rs9
-rw-r--r--src/librustuv/uvll.rs2
-rw-r--r--src/rt/rust_upcall.c24
-rw-r--r--src/rt/rustrt.def.in1
4 files changed, 26 insertions, 10 deletions
diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs
index 5cf2b32e2a4..0a2894acb66 100644
--- a/src/librustc/driver/driver.rs
+++ b/src/librustc/driver/driver.rs
@@ -85,11 +85,16 @@ pub fn default_configuration(sess: Session) ->
         abi::Mips =>   (@"big",    @"mips",   @"32")
     };
 
+    let fam = match sess.targ_cfg.os {
+        abi::OsWin32 => @"windows",
+        _ => @"unix"
+    };
+
     let mk = attr::mk_name_value_item_str;
     return ~[ // Target bindings.
-         attr::mk_word_item(os::FAMILY.to_managed()),
+         attr::mk_word_item(fam),
          mk(@"target_os", tos),
-         mk(@"target_family", os::FAMILY.to_managed()),
+         mk(@"target_family", fam),
          mk(@"target_arch", arch),
          mk(@"target_endian", end),
          mk(@"target_word_size", wordsz),
diff --git a/src/librustuv/uvll.rs b/src/librustuv/uvll.rs
index c8028032510..3917efe9ca8 100644
--- a/src/librustuv/uvll.rs
+++ b/src/librustuv/uvll.rs
@@ -724,5 +724,5 @@ extern {
 extern {}
 
 #[cfg(target_os = "win32")]
-#[link_args = "-lWs2_32 -lpsapi -liphlpapi"]
+#[link_args = "-lws2_32 -lpsapi -liphlpapi"]
 extern {}
diff --git a/src/rt/rust_upcall.c b/src/rt/rust_upcall.c
index 16621d29d4a..bda0898ca5c 100644
--- a/src/rt/rust_upcall.c
+++ b/src/rt/rust_upcall.c
@@ -25,14 +25,24 @@ typedef int _Unwind_Action;
 struct _Unwind_Context;
 struct _Unwind_Exception;
 
-#ifdef __SEH__
-#  define PERSONALITY_FUNC __gxx_personality_seh0
+#if __USING_SJLJ_EXCEPTIONS__
+#   define PERSONALITY_FUNC __gxx_personality_sj0
 #else
-#  ifdef __USING_SJLJ_EXCEPTIONS__
-#    define PERSONALITY_FUNC __gxx_personality_sjlj
-#  else
-#    define PERSONALITY_FUNC __gxx_personality_v0
-#  endif
+#   ifdef __SEH__
+#       define PERSONALITY_FUNC __gxx_personality_seh0
+#   else
+#       define PERSONALITY_FUNC __gxx_personality_v0
+#   endif
+#endif
+
+#if __USING_SJLJ_EXCEPTIONS__
+void _Unwind_SjLj_Resume(struct _Unwind_Exception* exception_object);
+
+void _Unwind_Resume(struct _Unwind_Exception* exception_object) {
+    _Unwind_SjLj_Resume(exception_object);
+}
+#else
+extern void _Unnwind_Resume(struct _Unwind_Exception* exception_object);
 #endif
 
 _Unwind_Reason_Code
diff --git a/src/rt/rustrt.def.in b/src/rt/rustrt.def.in
index 2a3e687ee55..53ce2067421 100644
--- a/src/rt/rustrt.def.in
+++ b/src/rt/rustrt.def.in
@@ -49,3 +49,4 @@ rust_get_test_int
 rust_pthread_mutex_t_size
 rust_pthread_cond_t_size
 rust_crit_section_size
+_Unwind_Resume