From e1a9668ab27805db83f97cafe2a937e6569863ff Mon Sep 17 00:00:00 2001 From: Stefan Plantikow Date: Sun, 18 Dec 2011 22:46:04 +0100 Subject: [PATCH] preparing for removing math from std --- src/libstd/comm.rs | 2 ++ src/libstd/fs.rs | 1 + src/libstd/io.rs | 4 ++-- src/libstd/linux_os.rs | 2 +- src/libstd/macos_os.rs | 2 +- src/libstd/math.rs | 6 +++--- src/libstd/rope.rs | 2 +- src/libstd/uv.rs | 2 ++ src/libstd/win32_os.rs | 2 +- 9 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/libstd/comm.rs b/src/libstd/comm.rs index e00205a522b..aee8beba111 100644 --- a/src/libstd/comm.rs +++ b/src/libstd/comm.rs @@ -29,6 +29,8 @@ Example: import sys; import task; +import core::ctypes; + export send; export recv; export chan; diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 46dad7b2bbb..6c8c614ab55 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -4,6 +4,7 @@ Module: fs File system manipulation */ +import core::ctypes; import core::vec; import core::option; import os; diff --git a/src/libstd/io.rs b/src/libstd/io.rs index 53dd5de3ab3..a4e12e5db87 100644 --- a/src/libstd/io.rs +++ b/src/libstd/io.rs @@ -6,8 +6,8 @@ Basic input/output import core::option; import core::result; -import ctypes::fd_t; -import ctypes::c_int; +import core::ctypes::fd_t; +import core::ctypes::c_int; #[abi = "cdecl"] native mod rustrt { diff --git a/src/libstd/linux_os.rs b/src/libstd/linux_os.rs index e5b13a7cfc2..7e7f0407f77 100644 --- a/src/libstd/linux_os.rs +++ b/src/libstd/linux_os.rs @@ -5,7 +5,7 @@ TODO: Restructure and document */ import core::option; -import ctypes::*; +import core::ctypes::*; export libc; export libc_constants; diff --git a/src/libstd/macos_os.rs b/src/libstd/macos_os.rs index 26e1dee82d8..35c7b19bb3d 100644 --- a/src/libstd/macos_os.rs +++ b/src/libstd/macos_os.rs @@ -1,5 +1,5 @@ import core::option; -import ctypes::*; +import core::ctypes::*; export libc; export libc_constants; diff --git a/src/libstd/math.rs b/src/libstd/math.rs index 0f365c44415..4dba290b6a4 100644 --- a/src/libstd/math.rs +++ b/src/libstd/math.rs @@ -23,9 +23,9 @@ import f32 = math_f32; // These two must match in width according to architecture -import ctypes::m_float; -import ctypes::c_int; -import ptr; +import core::mtypes::m_float; +import core::ctypes::c_int; +import core::ptr; import m_float = math_f64; /* diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs index bd07b6a8bc7..dea9d187110 100644 --- a/src/libstd/rope.rs +++ b/src/libstd/rope.rs @@ -1103,7 +1103,7 @@ mod node { right : right, char_len: char_len(left) + char_len(right), byte_len: byte_len(left) + byte_len(right), - height: math::max(height(left), height(right)) + 1u + height: float::max(height(left), height(right)) + 1u }) } diff --git a/src/libstd/uv.rs b/src/libstd/uv.rs index 17916b844e3..7dac5f6d51b 100644 --- a/src/libstd/uv.rs +++ b/src/libstd/uv.rs @@ -12,6 +12,8 @@ export loop_new, loop_delete, default_loop, run, unref; export idle_init, idle_start; export idle_new; +import core::ctypes; + #[link_name = "rustrt"] native mod uv { fn rust_uv_loop_new() -> *loop_t; diff --git a/src/libstd/win32_os.rs b/src/libstd/win32_os.rs index 825f4ffa0eb..0996a87737a 100644 --- a/src/libstd/win32_os.rs +++ b/src/libstd/win32_os.rs @@ -1,5 +1,5 @@ import core::option; -import ctypes::*; +import core::ctypes::*; #[abi = "cdecl"] #[link_name = ""] // FIXME remove after #[nolink] is snapshotted