From e3cee9fcabd8ab60b52512bc5e498350cf00055e Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 10 Apr 2014 22:49:00 +0200 Subject: [PATCH 1/2] Update to current rust: use the new attributes syntax. --- lib.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib.rs b/lib.rs index 5c802d9..af2bf5b 100644 --- a/lib.rs +++ b/lib.rs @@ -7,17 +7,18 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_id = "github.com/mozilla-servo/sharegl#0.1"]; -#[crate_type = "lib"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; +#![crate_id = "github.com/mozilla-servo/sharegl#0.1"] +#![crate_type = "lib"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] -#[feature(phase)]; -#[phase(syntax, link)] extern crate log; +#![feature(phase)] +extern crate geom; +#[phase(syntax, link)] +extern crate log; extern crate std; extern crate sync; -extern crate geom; #[cfg(target_os="macos")] extern crate core_foundation; From 5f1da2d0a3af10ccf271793fb1ca6da7cae620e3 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 10 Apr 2014 22:49:45 +0200 Subject: [PATCH 2/2] Update to current rust: libc is in its own crate. --- lib.rs | 1 + platform/linux.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib.rs b/lib.rs index af2bf5b..669f95b 100644 --- a/lib.rs +++ b/lib.rs @@ -15,6 +15,7 @@ #![feature(phase)] extern crate geom; +extern crate libc; #[phase(syntax, link)] extern crate log; extern crate std; diff --git a/platform/linux.rs b/platform/linux.rs index 04aff4b..ded889c 100644 --- a/platform/linux.rs +++ b/platform/linux.rs @@ -9,7 +9,7 @@ use context::GraphicsContextMethods; -use std::libc::{c_char, c_int, c_long, c_uint, c_ulong, c_void}; +use libc::{c_char, c_int, c_long, c_uint, c_ulong, c_void}; use std::ptr::null; use sync::Arc;