diff --git a/cgl.rs b/cgl.rs index 8260d4f..f5bc2aa 100644 --- a/cgl.rs +++ b/cgl.rs @@ -9,10 +9,10 @@ // Mac-specific OpenGL bindings. -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use gl2::{GLenum, GLint, GLsizei, GLuint}; -use std::libc::{c_void, c_int}; +use libc::{c_void, c_int}; pub type CGLContextObj = *c_void; pub type CGLError = c_int; @@ -103,7 +103,6 @@ pub static CORE_INTEGER_ATTRIBUTES: &'static [CGLPixelFormatAttribute] = kCGLPFAOpenGLProfile, kCGLPFAVirtualScreenCount]; -#[nolink] extern { // CGLCurrent.h diff --git a/gl2.rs b/gl2.rs index ae57305..ac83b13 100644 --- a/gl2.rs +++ b/gl2.rs @@ -9,8 +9,8 @@ /* automatically generated by rust-bindgen */ -use std::libc::{c_uint, c_uchar, c_void, c_char, int8_t, c_short, c_int, uint8_t, c_ushort}; -use std::libc::{int32_t, intptr_t, ssize_t}; +use libc::{c_uint, c_uchar, c_void, c_char, int8_t, c_short, c_int, uint8_t, c_ushort}; +use libc::{int32_t, intptr_t, ssize_t}; use std::cast; use std::cast::transmute; use std::cmp; @@ -21,17 +21,14 @@ use std::mem::size_of; use std::slice::from_elem; // Linking -#[nolink] #[cfg(target_os = "macos")] #[link(name = "OpenGL", kind = "framework")] extern { } -#[nolink] #[cfg(target_os = "linux")] #[link(name = "GL")] extern { } -#[nolink] #[cfg(target_os = "android")] #[link(name = "GLESv2")] extern { } @@ -1110,7 +1107,6 @@ pub mod apple { } } -#[nolink] extern { // Lower-level API diff --git a/lib.rs b/lib.rs index f94fe86..db7b597 100644 --- a/lib.rs +++ b/lib.rs @@ -7,11 +7,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_id = "github.com/mozilla-servo/rust-opengles#opengles:0.1"]; -#[crate_type = "lib"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; +#![crate_id = "github.com/mozilla-servo/rust-opengles#opengles:0.1"] +#![crate_type = "lib"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] +extern crate libc; extern crate std; pub mod gl2;