Skip to content

Commit

Permalink
Build fixes for latest rustc changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Jul 4, 2012
1 parent 1850697 commit 57a231f
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ src/ragel/ragel/ragel:
$(MAKE) -C src/ragel

src/harfbuzz/src/.libs/libharfbuzz.a: src/ragel/ragel/ragel
$(MAKE) -C src/harfbuzz PATH=$(PATH):$(BUILD_DIR)/src/ragel/ragel CXXFLAGS=-fPIC LDFLAGS=-fPIC
$(MAKE) -C src/harfbuzz PATH=$(PATH):$(BUILD_DIR)/src/ragel/ragel CXXFLAGS=-fPIC LDFLAGS="-fPIC -lstdc++"

src/mozjs/libjs_static.a:
$(MAKE) -C src/mozjs
Expand Down Expand Up @@ -133,7 +133,7 @@ check-rust-mozjs: src/mozjs/libjs_static.a

.PHONY: check-rust-azure
check-rust-azure: $(AZURE_DEPS)
RUSTFLAGS="-L ../rust-cocoa" $(MAKE) check -C src/rust-azure
RUSTFLAGS="-L ../rust-cocoa -L ../rust-geom" $(MAKE) check -C src/rust-azure

.PHONY: check-rust-sdl
check-rust-sdl:
Expand Down
2 changes: 1 addition & 1 deletion src/rust-azure
Submodule rust-azure updated 10 files
+2 −4 Makefile.in
+1 −1 azure.rs
+1 −1 cairo.rs
+1 −1 cairo_ft.rs
+1 −1 cairo_quartz.rs
+1 −1 cairo_xlib.rs
+1 −1 fontconfig.rs
+1 −1 freetype.rs
+2 −2 linkhack.rs
+1 −1 xlib.rs
2 changes: 1 addition & 1 deletion src/rust-cocoa
Submodule rust-cocoa updated 5 files
+3 −3 appkit.rs
+16 −16 base.rs
+1 −1 cg.rs
+1 −1 cocoa.rs
+5 −5 foundation.rs
2 changes: 1 addition & 1 deletion src/rust-harfbuzz
Submodule rust-harfbuzz updated 2 files
+1 −1 harfbuzz.rs
+2 −2 linkhack.rs
2 changes: 1 addition & 1 deletion src/rust-mozjs
Submodule rust-mozjs updated 7 files
+6 −6 crust.rs
+1 −1 global.rs
+1 −1 glue.rs
+1 −1 js.rs
+1 −1 jsapi.rs
+2 −2 linkhack.rs
+3 −3 rust.rs
2 changes: 1 addition & 1 deletion src/rust-sdl
Submodule rust-sdl updated 4 files
+1 −1 event.rs
+1 −1 sdl.rs
+2 −2 test.rs
+1 −1 video.rs
2 changes: 1 addition & 1 deletion src/rust-stb-image
Submodule rust-stb-image updated from 455bb6 to 2d87ae
4 changes: 2 additions & 2 deletions src/servo/platform/osmain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ mod platform {
#debug("getting osmain fptr: %?", fptr);

unsafe {
// FIXME: We probably don't want to run the main routine in a crust function
// FIXME: We probably don't want to run the main routine in a foreign function
(*fptr)();
}
}

fn create(f: fn()) -> id {
let NSObject = str::as_c_str("NSObject", |s| ojc::objc_getClass(s));
let NSObject = str::as_c_str("NSObject", |s| objc::objc_getClass(s));
let MainObj = str::as_c_str("MainObj", |s| {
objc::objc_allocateClassPair(NSObject, s, 0 as libc::size_t)
});
Expand Down
4 changes: 2 additions & 2 deletions src/servo/text/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ mod cocoa {
}

#[cfg(target_os = "macos")]
fn get_cairo_face(buf: &[u8]) -> (*cairo_font_face_t, fn@()) {
fn get_cairo_face(buf: &~[u8]) -> (*cairo_font_face_t, fn@()) {
import unsafe::reinterpret_cast;
import libc::size_t;
import cocoa::cocoa;
Expand Down Expand Up @@ -296,7 +296,7 @@ fn should_get_glyph_advance() {
fn should_be_able_to_create_instances_in_multiple_threads() {
#[test];

iter::repeat(10u, || task::spawn(|| {create_test_font();}));
for iter::repeat(10u) {do task::spawn {create_test_font();}}
}

fn get_cairo_face_should_fail_and_not_leak_if_font_cant_be_created() {
Expand Down
9 changes: 5 additions & 4 deletions src/servo/text/native_font/quartz_native_font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class QuartzNativeFont/& {
}
}

fn create(buf: &[u8]) -> result<QuartzNativeFont, ()> {
let fontprov = vec::as_buf(*buf, |cbuf| {
fn create(buf: [u8]) -> result<QuartzNativeFont, ()> {
let fontprov = vec::as_buf(buf, |cbuf| {
CGDataProviderCreateWithData(
null(),
unsafe { reinterpret_cast(cbuf) },
(*buf).len() as size_t,
buf.len() as size_t,
null())
});
// FIXME: Error handling
Expand All @@ -70,6 +70,7 @@ fn with_test_native_font(f: fn@(nf: &NativeFont)) {
import unwrap_result = result::unwrap;

let buf = test_font_bin();
let font = unwrap_result(create(&buf));
let res = create(buf);
let font = unwrap_result(res);
f(&font);
}
10 changes: 5 additions & 5 deletions src/servo/text/shaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ fn shape_text(font: &Font, text: str) -> [Glyph] unsafe {
}

extern fn glyph_func(_font: *hb_font_t,
font_data: *c_void,
unicode: hb_codepoint_t,
_variant_selector: hb_codepoint_t,
glyph: *mut hb_codepoint_t,
_user_data: *c_void) -> hb_bool_t unsafe {
font_data: *c_void,
unicode: hb_codepoint_t,
_variant_selector: hb_codepoint_t,
glyph: *mut hb_codepoint_t,
_user_data: *c_void) -> hb_bool_t unsafe {

let font: *Font = reinterpret_cast(font_data);
assert font.is_not_null();
Expand Down

0 comments on commit 57a231f

Please sign in to comment.