diff --git a/build.rs b/build.rs index 183b47ffd70f3..0ee39951c0723 100644 --- a/build.rs +++ b/build.rs @@ -20,7 +20,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[ "libc_deny_warnings", "libc_long_array", "libc_non_exhaustive", - "libc_packedN", "libc_ptr_addr_of", "libc_thread_local", "libc_underscore_const_names", @@ -85,9 +84,8 @@ fn main() { set_cfg("libc_deny_warnings"); } - // Rust >= 1.33 supports repr(packed(N)) and cfg(target_vendor). + // Rust >= 1.33 supports cfg(target_vendor). if rustc_minor_ver >= 33 || rustc_dep_of_std { - set_cfg("libc_packedN"); set_cfg("libc_cfg_target_vendor"); } diff --git a/libc-test/build.rs b/libc-test/build.rs index 166726eaf6fbd..0dec4bba362f5 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -67,7 +67,7 @@ fn do_ctest() { fn ctest_cfg() -> ctest::TestGenerator { let mut cfg = ctest::TestGenerator::new(); - let libc_cfgs = ["libc_packedN", "libc_thread_local"]; + let libc_cfgs = ["libc_thread_local"]; for f in &libc_cfgs { cfg.cfg(f, None); } diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index efac489dcfc30..7ed887753c971 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -1193,13 +1193,13 @@ s! { } s_no_extra_traits! { - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct ifconf { pub ifc_len: ::c_int, pub ifc_ifcu: __c_anonymous_ifc_ifcu, } - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct kevent { pub ident: ::uintptr_t, pub filter: i16, @@ -1209,7 +1209,7 @@ s_no_extra_traits! { pub udata: *mut ::c_void, } - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct semid_ds { // Note the manpage shows different types than the system header. pub sem_perm: ipc_perm, @@ -1222,7 +1222,7 @@ s_no_extra_traits! { pub sem_pad3: [i32; 4], } - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct shmid_ds { pub shm_perm: ipc_perm, pub shm_segsz: ::size_t, @@ -1381,7 +1381,7 @@ s_no_extra_traits! { pub pth_name: [::c_char; MAXTHREADNAMESIZE], } - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct if_data64 { pub ifi_type: ::c_uchar, pub ifi_typelen: ::c_uchar, @@ -1413,7 +1413,7 @@ s_no_extra_traits! { pub ifi_lastchange: timeval32, } - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct if_msghdr2 { pub ifm_msglen: ::c_ushort, pub ifm_version: ::c_uchar, @@ -1428,7 +1428,7 @@ s_no_extra_traits! { pub ifm_data: if_data64, } - #[cfg_attr(libc_packedN, repr(packed(8)))] + #[repr(packed(8))] pub struct vm_statistics64 { pub free_count: natural_t, pub active_count: natural_t, @@ -1456,7 +1456,7 @@ s_no_extra_traits! { pub total_uncompressed_pages_in_compressor: u64, } - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct mach_task_basic_info { pub virtual_size: mach_vm_size_t, pub resident_size: mach_vm_size_t, @@ -1467,7 +1467,7 @@ s_no_extra_traits! { pub suspend_count: integer_t, } - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct log2phys { pub l2p_flags: ::c_uint, pub l2p_contigbytes: ::off_t, @@ -1478,7 +1478,7 @@ s_no_extra_traits! { _os_unfair_lock_opaque: u32, } - #[cfg_attr(libc_packedN, repr(packed(1)))] + #[repr(packed(1))] pub struct sockaddr_vm { pub svm_len: ::c_uchar, pub svm_family: ::sa_family_t, @@ -1498,7 +1498,7 @@ s_no_extra_traits! { pub ifk_value: ::c_int, } - #[cfg_attr(libc_packedN, repr(packed(4)))] + #[repr(packed(4))] pub struct ifkpi { pub ifk_module_id: ::c_uint, pub ifk_type: ::c_uint, diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index 62a07f6279030..07cc583f43f3d 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -46,10 +46,7 @@ s! { } s_no_extra_traits! { - #[cfg_attr(any( - target_arch = "x86", target_arch = "x86_64"), - repr(packed(4)) - )] + #[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), repr(packed(4)))] pub struct epoll_event { pub events: u32, pub u64: u64,