diff --git a/src/doc/guide-ffi.md b/src/doc/guide-ffi.md index 81616c675de..ad80f2b46c8 100644 --- a/src/doc/guide-ffi.md +++ b/src/doc/guide-ffi.md @@ -476,6 +476,7 @@ extern crate libc; #[cfg(target_os = "win32", target_arch = "x86")] #[link(name = "kernel32")] +#[allow(non_snake_case_functions)] extern "stdcall" { fn SetEnvironmentVariableA(n: *u8, v: *u8) -> libc::c_int; } diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 7b6a9122d90..3a9f8bc863b 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -71,6 +71,7 @@ */ #![allow(non_camel_case_types)] +#![allow(non_snake_case_functions)] #![allow(non_uppercase_statics)] #![allow(missing_doc)] #![allow(uppercase_variables)] diff --git a/src/libnative/io/mod.rs b/src/libnative/io/mod.rs index 0c103bc4695..240b87fda08 100644 --- a/src/libnative/io/mod.rs +++ b/src/libnative/io/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -21,6 +21,8 @@ //! play. The only dependencies of these modules are the normal system libraries //! that you would find on the respective platform. +#![allow(non_snake_case_functions)] + use libc::c_int; use libc; use std::c_str::CString; diff --git a/src/librustdoc/flock.rs b/src/librustdoc/flock.rs index f24bd661c8c..fea6748660b 100644 --- a/src/librustdoc/flock.rs +++ b/src/librustdoc/flock.rs @@ -141,6 +141,7 @@ mod imp { static LOCKFILE_EXCLUSIVE_LOCK: libc::DWORD = 0x00000002; + #[allow(non_snake_case_functions)] extern "system" { fn LockFileEx(hFile: libc::HANDLE, dwFlags: libc::DWORD, diff --git a/src/libstd/os.rs b/src/libstd/os.rs index f6b9a7b24bc..7e6d3c0606f 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -27,6 +27,7 @@ */ #![allow(missing_doc)] +#![allow(non_snake_case_functions)] use clone::Clone; use container::Container; diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs index 3a6c0124ee0..284d41d3208 100644 --- a/src/libstd/rand/os.rs +++ b/src/libstd/rand/os.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -93,6 +93,7 @@ mod imp { static CRYPT_VERIFYCONTEXT: DWORD = 0xF0000000; static NTE_BAD_SIGNATURE: DWORD = 0x80090006; + #[allow(non_snake_case_functions)] extern "system" { fn CryptAcquireContextA(phProv: *mut HCRYPTPROV, pszContainer: LPCSTR, diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs index f4cb770544c..ac421bf78be 100644 --- a/src/libstd/rt/backtrace.rs +++ b/src/libstd/rt/backtrace.rs @@ -518,6 +518,7 @@ mod imp { use unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT}; use slice::ImmutableVector; + #[allow(non_snake_case_functions)] extern "system" { fn GetCurrentProcess() -> libc::HANDLE; fn GetCurrentThread() -> libc::HANDLE; diff --git a/src/libstd/rt/libunwind.rs b/src/libstd/rt/libunwind.rs index 4fd610d7423..00301e71b0d 100644 --- a/src/libstd/rt/libunwind.rs +++ b/src/libstd/rt/libunwind.rs @@ -11,6 +11,7 @@ //! Unwind library interface #![allow(non_camel_case_types)] +#![allow(non_snake_case_functions)] #![allow(dead_code)] // these are just bindings use libc; diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index 6cc9604dc59..81dcf909706 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -199,6 +199,7 @@ mod imp { SwitchToThread(); } + #[allow(non_snake_case_functions)] extern "system" { fn CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES, dwStackSize: SIZE_T, diff --git a/src/libstd/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs index 2551c89972e..a3ebcbafff8 100644 --- a/src/libstd/rt/thread_local_storage.rs +++ b/src/libstd/rt/thread_local_storage.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -86,6 +86,7 @@ pub unsafe fn destroy(key: Key) { } #[cfg(windows)] +#[allow(non_snake_case_functions)] extern "system" { fn TlsAlloc() -> DWORD; fn TlsFree(dwTlsIndex: DWORD) -> BOOL; diff --git a/src/libstd/unstable/dynamic_lib.rs b/src/libstd/unstable/dynamic_lib.rs index 81eb51107ba..6c406a7c847 100644 --- a/src/libstd/unstable/dynamic_lib.rs +++ b/src/libstd/unstable/dynamic_lib.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -317,6 +317,7 @@ pub mod dl { FreeLibrary(handle as *libc::c_void); () } + #[allow(non_snake_case_functions)] extern "system" { fn SetLastError(error: libc::size_t); fn LoadLibraryW(name: *libc::c_void) -> *libc::c_void; diff --git a/src/libstd/unstable/mutex.rs b/src/libstd/unstable/mutex.rs index 04da7dab6c6..4e51e714777 100644 --- a/src/libstd/unstable/mutex.rs +++ b/src/libstd/unstable/mutex.rs @@ -543,6 +543,7 @@ mod imp { libc::CloseHandle(block); } + #[allow(non_snake_case_functions)] extern "system" { fn CreateEventA(lpSecurityAttributes: LPSECURITY_ATTRIBUTES, bManualReset: BOOL, diff --git a/src/libterm/win.rs b/src/libterm/win.rs index 837ddf566ef..00e90fc3cde 100644 --- a/src/libterm/win.rs +++ b/src/libterm/win.rs @@ -27,6 +27,7 @@ pub struct WinConsole { background: color::Color, } +#[allow(non_snake_case_functions)] #[link(name = "kernel32")] extern "system" { fn SetConsoleTextAttribute(handle: libc::HANDLE, attr: libc::WORD) -> libc::BOOL; diff --git a/src/test/bench/shootout-spectralnorm.rs b/src/test/bench/shootout-spectralnorm.rs index c6a678828c1..c038a056569 100644 --- a/src/test/bench/shootout-spectralnorm.rs +++ b/src/test/bench/shootout-spectralnorm.rs @@ -9,6 +9,7 @@ // except according to those terms. #![feature(phase)] +#![allow(non_snake_case_functions)] #[phase(syntax)] extern crate green; extern crate sync; diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs index 9235882d1f4..c0ea6f8617d 100644 --- a/src/test/bench/sudoku.rs +++ b/src/test/bench/sudoku.rs @@ -11,6 +11,7 @@ // ignore-pretty very bad with line comments #![feature(managed_boxes)] +#![allow(non_snake_case_functions)] use std::io; use std::io::stdio::StdReader;