Skip to content

Commit 9dac79f

Browse files
joshtripletttgross35
authored andcommitted
Require rust >= 1.33 and drop libc_packedN conditional
[ resolve conflicts, update to latest - Trevor ]
1 parent e221887 commit 9dac79f

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

build.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
2020
"libc_deny_warnings",
2121
"libc_long_array",
2222
"libc_non_exhaustive",
23-
"libc_packedN",
2423
"libc_ptr_addr_of",
2524
"libc_thread_local",
2625
"libc_underscore_const_names",
@@ -85,9 +84,8 @@ fn main() {
8584
set_cfg("libc_deny_warnings");
8685
}
8786

88-
// Rust >= 1.33 supports repr(packed(N)) and cfg(target_vendor).
87+
// Rust >= 1.33 supports cfg(target_vendor).
8988
if rustc_minor_ver >= 33 || rustc_dep_of_std {
90-
set_cfg("libc_packedN");
9189
set_cfg("libc_cfg_target_vendor");
9290
}
9391

libc-test/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn do_ctest() {
6767

6868
fn ctest_cfg() -> ctest::TestGenerator {
6969
let mut cfg = ctest::TestGenerator::new();
70-
let libc_cfgs = ["libc_packedN", "libc_thread_local"];
70+
let libc_cfgs = ["libc_thread_local"];
7171
for f in &libc_cfgs {
7272
cfg.cfg(f, None);
7373
}

src/unix/bsd/apple/mod.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1193,13 +1193,13 @@ s! {
11931193
}
11941194

11951195
s_no_extra_traits! {
1196-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1196+
#[repr(packed(4))]
11971197
pub struct ifconf {
11981198
pub ifc_len: ::c_int,
11991199
pub ifc_ifcu: __c_anonymous_ifc_ifcu,
12001200
}
12011201

1202-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1202+
#[repr(packed(4))]
12031203
pub struct kevent {
12041204
pub ident: ::uintptr_t,
12051205
pub filter: i16,
@@ -1209,7 +1209,7 @@ s_no_extra_traits! {
12091209
pub udata: *mut ::c_void,
12101210
}
12111211

1212-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1212+
#[repr(packed(4))]
12131213
pub struct semid_ds {
12141214
// Note the manpage shows different types than the system header.
12151215
pub sem_perm: ipc_perm,
@@ -1222,7 +1222,7 @@ s_no_extra_traits! {
12221222
pub sem_pad3: [i32; 4],
12231223
}
12241224

1225-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1225+
#[repr(packed(4))]
12261226
pub struct shmid_ds {
12271227
pub shm_perm: ipc_perm,
12281228
pub shm_segsz: ::size_t,
@@ -1381,7 +1381,7 @@ s_no_extra_traits! {
13811381
pub pth_name: [::c_char; MAXTHREADNAMESIZE],
13821382
}
13831383

1384-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1384+
#[repr(packed(4))]
13851385
pub struct if_data64 {
13861386
pub ifi_type: ::c_uchar,
13871387
pub ifi_typelen: ::c_uchar,
@@ -1413,7 +1413,7 @@ s_no_extra_traits! {
14131413
pub ifi_lastchange: timeval32,
14141414
}
14151415

1416-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1416+
#[repr(packed(4))]
14171417
pub struct if_msghdr2 {
14181418
pub ifm_msglen: ::c_ushort,
14191419
pub ifm_version: ::c_uchar,
@@ -1428,7 +1428,7 @@ s_no_extra_traits! {
14281428
pub ifm_data: if_data64,
14291429
}
14301430

1431-
#[cfg_attr(libc_packedN, repr(packed(8)))]
1431+
#[repr(packed(8))]
14321432
pub struct vm_statistics64 {
14331433
pub free_count: natural_t,
14341434
pub active_count: natural_t,
@@ -1456,7 +1456,7 @@ s_no_extra_traits! {
14561456
pub total_uncompressed_pages_in_compressor: u64,
14571457
}
14581458

1459-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1459+
#[repr(packed(4))]
14601460
pub struct mach_task_basic_info {
14611461
pub virtual_size: mach_vm_size_t,
14621462
pub resident_size: mach_vm_size_t,
@@ -1467,7 +1467,7 @@ s_no_extra_traits! {
14671467
pub suspend_count: integer_t,
14681468
}
14691469

1470-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1470+
#[repr(packed(4))]
14711471
pub struct log2phys {
14721472
pub l2p_flags: ::c_uint,
14731473
pub l2p_contigbytes: ::off_t,
@@ -1478,7 +1478,7 @@ s_no_extra_traits! {
14781478
_os_unfair_lock_opaque: u32,
14791479
}
14801480

1481-
#[cfg_attr(libc_packedN, repr(packed(1)))]
1481+
#[repr(packed(1))]
14821482
pub struct sockaddr_vm {
14831483
pub svm_len: ::c_uchar,
14841484
pub svm_family: ::sa_family_t,
@@ -1498,7 +1498,7 @@ s_no_extra_traits! {
14981498
pub ifk_value: ::c_int,
14991499
}
15001500

1501-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1501+
#[repr(packed(4))]
15021502
pub struct ifkpi {
15031503
pub ifk_module_id: ::c_uint,
15041504
pub ifk_type: ::c_uint,

src/unix/solarish/illumos.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ s! {
4646
}
4747

4848
s_no_extra_traits! {
49-
#[cfg_attr(any(
50-
target_arch = "x86", target_arch = "x86_64"),
51-
repr(packed(4))
52-
)]
49+
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), repr(packed(4)))]
5350
pub struct epoll_event {
5451
pub events: u32,
5552
pub u64: u64,

0 commit comments

Comments
 (0)