diff --git a/core-foundation-sys/src/array.rs b/core-foundation-sys/src/array.rs index d85b6dcd0..7944a743a 100644 --- a/core-foundation-sys/src/array.rs +++ b/core-foundation-sys/src/array.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFRange, CFIndex, CFAllocatorRef, CFTypeID, Boolean, CFComparatorFunction}; use string::CFStringRef; diff --git a/core-foundation-sys/src/attributed_string.rs b/core-foundation-sys/src/attributed_string.rs index 36c0d699d..e1cae20a9 100644 --- a/core-foundation-sys/src/attributed_string.rs +++ b/core-foundation-sys/src/attributed_string.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFTypeRef, CFIndex, CFRange, CFTypeID, Boolean}; use string::CFStringRef; use dictionary::CFDictionaryRef; diff --git a/core-foundation-sys/src/bag.rs b/core-foundation-sys/src/bag.rs index 3199f0062..bf42d1b9f 100644 --- a/core-foundation-sys/src/bag.rs +++ b/core-foundation-sys/src/bag.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, Boolean, CFHashCode, CFIndex, CFTypeID}; use string::CFStringRef; diff --git a/core-foundation-sys/src/base.rs b/core-foundation-sys/src/base.rs index 05dfb53c2..5733513e1 100644 --- a/core-foundation-sys/src/base.rs +++ b/core-foundation-sys/src/base.rs @@ -7,8 +7,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::cmp::Ordering; -use std::os::raw::{c_uint, c_void, c_int, c_short, c_uchar, c_ushort}; +use core::cmp::Ordering; +use core::ffi::{c_uint, c_void, c_int, c_short, c_uchar, c_ushort}; use string::CFStringRef; pub type Boolean = u8; diff --git a/core-foundation-sys/src/binary_heap.rs b/core-foundation-sys/src/binary_heap.rs index 479ff29a8..44e9c519e 100644 --- a/core-foundation-sys/src/binary_heap.rs +++ b/core-foundation-sys/src/binary_heap.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFTypeID, CFAllocatorRef, Boolean, CFIndex, CFComparisonResult}; use string::CFStringRef; diff --git a/core-foundation-sys/src/bit_vector.rs b/core-foundation-sys/src/bit_vector.rs index 1c5fc72ce..d8220a7e4 100644 --- a/core-foundation-sys/src/bit_vector.rs +++ b/core-foundation-sys/src/bit_vector.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, Boolean, UInt32, CFIndex, CFTypeID, CFRange, UInt8}; diff --git a/core-foundation-sys/src/bundle.rs b/core-foundation-sys/src/bundle.rs index 792c04858..54c8c4736 100644 --- a/core-foundation-sys/src/bundle.rs +++ b/core-foundation-sys/src/bundle.rs @@ -7,10 +7,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFTypeID, CFAllocatorRef, Boolean, CFTypeRef, UInt32, SInt32}; -use std::os::raw::{c_uint, c_int}; +use core::ffi::{c_uint, c_int}; use url::CFURLRef; use dictionary::CFDictionaryRef; use string::CFStringRef; @@ -27,7 +27,7 @@ pub type CFBundleRefNum = c_int; #[allow(unused)] #[inline(always)] pub unsafe fn CFCopyLocalizedString(key: CFStringRef, comment: CFStringRef) -> CFStringRef { - CFBundleCopyLocalizedString(CFBundleGetMainBundle(), key, key, std::ptr::null()) + CFBundleCopyLocalizedString(CFBundleGetMainBundle(), key, key, core::ptr::null()) } #[allow(unused)] #[inline(always)] diff --git a/core-foundation-sys/src/calendar.rs b/core-foundation-sys/src/calendar.rs index 175bb0453..2c6fa8213 100644 --- a/core-foundation-sys/src/calendar.rs +++ b/core-foundation-sys/src/calendar.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::{c_void, c_char}; +use core::ffi::{c_void, c_char}; use base::{CFAllocatorRef, CFTypeID, Boolean, CFIndex, CFOptionFlags, CFRange}; use locale::{CFCalendarIdentifier, CFLocaleRef}; diff --git a/core-foundation-sys/src/characterset.rs b/core-foundation-sys/src/characterset.rs index d3c65e655..92b29872f 100644 --- a/core-foundation-sys/src/characterset.rs +++ b/core-foundation-sys/src/characterset.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, UTF32Char}; use data::CFDataRef; use string::{CFStringRef, UniChar}; diff --git a/core-foundation-sys/src/data.rs b/core-foundation-sys/src/data.rs index a332e4ef8..9b2e8c5cf 100644 --- a/core-foundation-sys/src/data.rs +++ b/core-foundation-sys/src/data.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFTypeID, CFIndex, CFRange, CFOptionFlags}; #[repr(C)] diff --git a/core-foundation-sys/src/date.rs b/core-foundation-sys/src/date.rs index f83ce1dd1..59d759a8c 100644 --- a/core-foundation-sys/src/date.rs +++ b/core-foundation-sys/src/date.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFComparisonResult, CFTypeID}; diff --git a/core-foundation-sys/src/date_formatter.rs b/core-foundation-sys/src/date_formatter.rs index f545cfc4e..e0f20f92c 100644 --- a/core-foundation-sys/src/date_formatter.rs +++ b/core-foundation-sys/src/date_formatter.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFIndex, CFOptionFlags, CFAllocatorRef, CFTypeID, CFTypeRef, CFRange, Boolean}; use string::CFStringRef; diff --git a/core-foundation-sys/src/dictionary.rs b/core-foundation-sys/src/dictionary.rs index 4e6436839..da0203f9c 100644 --- a/core-foundation-sys/src/dictionary.rs +++ b/core-foundation-sys/src/dictionary.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFHashCode, CFIndex, CFTypeID, Boolean}; use string::CFStringRef; diff --git a/core-foundation-sys/src/error.rs b/core-foundation-sys/src/error.rs index 3082bf638..51c1a5a0f 100644 --- a/core-foundation-sys/src/error.rs +++ b/core-foundation-sys/src/error.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFTypeID, CFIndex, CFAllocatorRef}; use string::CFStringRef; diff --git a/core-foundation-sys/src/file_security.rs b/core-foundation-sys/src/file_security.rs index cb51e98ad..e9ee36368 100644 --- a/core-foundation-sys/src/file_security.rs +++ b/core-foundation-sys/src/file_security.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, Boolean, CFTypeID}; #[cfg(feature="mac_os_10_8_features")] diff --git a/core-foundation-sys/src/filedescriptor.rs b/core-foundation-sys/src/filedescriptor.rs index 036d8d58a..62fb41952 100644 --- a/core-foundation-sys/src/filedescriptor.rs +++ b/core-foundation-sys/src/filedescriptor.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::{c_int, c_void}; +use core::ffi::{c_int, c_void}; use base::{Boolean, CFIndex, CFTypeID, CFOptionFlags, CFAllocatorRef}; use string::CFStringRef; diff --git a/core-foundation-sys/src/lib.rs b/core-foundation-sys/src/lib.rs index 9f434adba..bdfdf9a85 100644 --- a/core-foundation-sys/src/lib.rs +++ b/core-foundation-sys/src/lib.rs @@ -6,6 +6,7 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. +#![no_std] #![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, improper_ctypes)] #![cfg_attr(all(feature="mac_os_10_7_support", feature="mac_os_10_8_features"), feature(linkage))] // back-compat requires weak linkage diff --git a/core-foundation-sys/src/locale.rs b/core-foundation-sys/src/locale.rs index a1fd764d5..4d2edca3d 100644 --- a/core-foundation-sys/src/locale.rs +++ b/core-foundation-sys/src/locale.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFIndex, CFAllocatorRef, CFTypeRef, LangCode, RegionCode, CFTypeID}; use array::CFArrayRef; use string::CFStringRef; diff --git a/core-foundation-sys/src/mach_port.rs b/core-foundation-sys/src/mach_port.rs index a25a44c12..19a998924 100644 --- a/core-foundation-sys/src/mach_port.rs +++ b/core-foundation-sys/src/mach_port.rs @@ -10,7 +10,7 @@ use base::{CFAllocatorRef, CFIndex, CFTypeID, Boolean, mach_port_t}; use string::CFStringRef; use runloop::CFRunLoopSourceRef; -use std::os::raw::c_void; +use core::ffi::c_void; #[repr(C)] pub struct __CFMachPort(c_void); diff --git a/core-foundation-sys/src/messageport.rs b/core-foundation-sys/src/messageport.rs index 263f0c52b..2e0ec710a 100644 --- a/core-foundation-sys/src/messageport.rs +++ b/core-foundation-sys/src/messageport.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFIndex, CFTypeID, Boolean, SInt32}; use data::CFDataRef; diff --git a/core-foundation-sys/src/notification_center.rs b/core-foundation-sys/src/notification_center.rs index 002c1fe27..e2a6b058a 100644 --- a/core-foundation-sys/src/notification_center.rs +++ b/core-foundation-sys/src/notification_center.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFOptionFlags, CFIndex, CFTypeID, Boolean}; use dictionary::CFDictionaryRef; diff --git a/core-foundation-sys/src/number.rs b/core-foundation-sys/src/number.rs index a355baaed..5c65320bb 100644 --- a/core-foundation-sys/src/number.rs +++ b/core-foundation-sys/src/number.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFTypeID, CFComparisonResult, Boolean, CFIndex}; diff --git a/core-foundation-sys/src/number_formatter.rs b/core-foundation-sys/src/number_formatter.rs index 8960c61fa..da320c72c 100644 --- a/core-foundation-sys/src/number_formatter.rs +++ b/core-foundation-sys/src/number_formatter.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::{c_void, c_double}; +use core::ffi::{c_void, c_double}; use base::{CFIndex, CFOptionFlags, CFAllocatorRef, CFTypeID, CFRange, Boolean, CFTypeRef}; use string::CFStringRef; diff --git a/core-foundation-sys/src/plugin.rs b/core-foundation-sys/src/plugin.rs index f5f133f4d..df47eca52 100644 --- a/core-foundation-sys/src/plugin.rs +++ b/core-foundation-sys/src/plugin.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFTypeID, Boolean, CFIndex}; use bundle::{CFPlugInRef, CFBundleRef}; diff --git a/core-foundation-sys/src/runloop.rs b/core-foundation-sys/src/runloop.rs index 062b93cb1..342a2a6af 100644 --- a/core-foundation-sys/src/runloop.rs +++ b/core-foundation-sys/src/runloop.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use array::CFArrayRef; use base::{Boolean, CFIndex, CFTypeID, CFAllocatorRef, CFOptionFlags, CFHashCode, mach_port_t}; diff --git a/core-foundation-sys/src/set.rs b/core-foundation-sys/src/set.rs index 57440e352..f7167ec3b 100644 --- a/core-foundation-sys/src/set.rs +++ b/core-foundation-sys/src/set.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFIndex, CFTypeID, Boolean, CFHashCode}; use string::CFStringRef; diff --git a/core-foundation-sys/src/socket.rs b/core-foundation-sys/src/socket.rs index a3d81c455..afade4cfb 100644 --- a/core-foundation-sys/src/socket.rs +++ b/core-foundation-sys/src/socket.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFIndex, CFOptionFlags, SInt32, CFTypeID, CFAllocatorRef, UInt16, Boolean}; use data::CFDataRef; @@ -25,9 +25,9 @@ pub type CFSocketError = CFIndex; pub type CFSocketCallBackType = CFOptionFlags; pub type CFSocketCallBack = extern "C" fn (s: CFSocketRef, _type: CFSocketCallBackType, address: CFDataRef, cdata: *const c_void, info: *mut c_void); #[cfg(not(target_os = "windows"))] -pub type CFSocketNativeHandle = std::os::raw::c_int; +pub type CFSocketNativeHandle = core::ffi::c_int; #[cfg(target_os = "windows")] -pub type CFSocketNativeHandle = std::os::raw::c_ulong; +pub type CFSocketNativeHandle = core::ffi::c_ulong; pub const kCFSocketSuccess: CFSocketError = 0; pub const kCFSocketError: CFSocketError = -1; diff --git a/core-foundation-sys/src/stream.rs b/core-foundation-sys/src/stream.rs index 26816e16a..117d8f9a0 100644 --- a/core-foundation-sys/src/stream.rs +++ b/core-foundation-sys/src/stream.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::{c_void, c_int}; +use core::ffi::{c_void, c_int}; use base::{CFIndex, CFOptionFlags, SInt32, CFTypeID, CFAllocatorRef, UInt8, Boolean, CFTypeRef, UInt32}; use string::CFStringRef; diff --git a/core-foundation-sys/src/string.rs b/core-foundation-sys/src/string.rs index 46a94bee5..0baf89fb5 100644 --- a/core-foundation-sys/src/string.rs +++ b/core-foundation-sys/src/string.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::{c_char, c_void, c_ulong, c_double, c_ushort}; +use core::ffi::{c_char, c_void, c_ulong, c_double, c_ushort}; use base::{Boolean, CFOptionFlags, CFIndex, CFAllocatorRef, ConstStr255Param, CFRange, CFTypeID, SInt32, UInt32, UInt8, CFComparisonResult, StringPtr, ConstStringPtr, UTF32Char}; use array::CFArrayRef; use data::CFDataRef; diff --git a/core-foundation-sys/src/string_tokenizer.rs b/core-foundation-sys/src/string_tokenizer.rs index f4c23d4a4..1318d38a6 100644 --- a/core-foundation-sys/src/string_tokenizer.rs +++ b/core-foundation-sys/src/string_tokenizer.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFTypeID, CFRange, CFIndex, CFOptionFlags, CFTypeRef}; use string::CFStringRef; diff --git a/core-foundation-sys/src/timezone.rs b/core-foundation-sys/src/timezone.rs index 91e7ed0b1..cfdf4b28e 100644 --- a/core-foundation-sys/src/timezone.rs +++ b/core-foundation-sys/src/timezone.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFTypeID, Boolean, CFIndex}; use date::{CFTimeInterval, CFAbsoluteTime}; diff --git a/core-foundation-sys/src/tree.rs b/core-foundation-sys/src/tree.rs index ddc5fdf74..20f1278a6 100644 --- a/core-foundation-sys/src/tree.rs +++ b/core-foundation-sys/src/tree.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFIndex, CFTypeID, CFAllocatorRef, CFComparatorFunction}; use string::CFStringRef; diff --git a/core-foundation-sys/src/url.rs b/core-foundation-sys/src/url.rs index 75235fcb6..2f1eb10a3 100644 --- a/core-foundation-sys/src/url.rs +++ b/core-foundation-sys/src/url.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFOptionFlags, CFIndex, CFAllocatorRef, Boolean, CFTypeID, CFTypeRef, SInt32, CFRange}; use data::CFDataRef; diff --git a/core-foundation-sys/src/url_enumerator.rs b/core-foundation-sys/src/url_enumerator.rs index 553426625..e347c6a86 100644 --- a/core-foundation-sys/src/url_enumerator.rs +++ b/core-foundation-sys/src/url_enumerator.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFOptionFlags, CFIndex, CFTypeID, CFAllocatorRef, Boolean}; use url::CFURLRef; diff --git a/core-foundation-sys/src/user_notification.rs b/core-foundation-sys/src/user_notification.rs index 0e01856bb..7799ffd49 100644 --- a/core-foundation-sys/src/user_notification.rs +++ b/core-foundation-sys/src/user_notification.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFOptionFlags, CFIndex, CFAllocatorRef, CFTypeID, SInt32}; use dictionary::CFDictionaryRef; diff --git a/core-foundation-sys/src/uuid.rs b/core-foundation-sys/src/uuid.rs index d04c711d2..dce340a83 100644 --- a/core-foundation-sys/src/uuid.rs +++ b/core-foundation-sys/src/uuid.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFAllocatorRef, CFTypeID}; use string::CFStringRef; diff --git a/core-foundation-sys/src/xml_node.rs b/core-foundation-sys/src/xml_node.rs index 7626d3959..2c8cc6921 100644 --- a/core-foundation-sys/src/xml_node.rs +++ b/core-foundation-sys/src/xml_node.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::{c_void, c_char}; +use core::ffi::{c_void, c_char}; use base::{Boolean, CFIndex, CFAllocatorRef, CFTypeID}; use tree::CFTreeRef; diff --git a/core-foundation-sys/src/xml_parser.rs b/core-foundation-sys/src/xml_parser.rs index 091d624cd..9ff9d6b9b 100644 --- a/core-foundation-sys/src/xml_parser.rs +++ b/core-foundation-sys/src/xml_parser.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::os::raw::c_void; +use core::ffi::c_void; use base::{CFOptionFlags, CFIndex, Boolean, CFAllocatorRef, CFTypeID}; use xml_node::{CFXMLNodeRef, CFXMLTreeRef, CFXMLExternalID};