Skip to content

Commit b76911e

Browse files
committed
Auto merge of #2522 - rtzoeller:dfly_handle_deprecations, r=JohnTitor
Fix/remove deprecated DragonFly items These items were recently deprecated on DragonFly, either because the platform does not define them or because they were out of date.
2 parents 7f8d244 + 45cd3dc commit b76911e

File tree

3 files changed

+4
-23
lines changed

3 files changed

+4
-23
lines changed

libc-test/semver/dragonfly.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ Elf64_Word
288288
Elf64_Xword
289289
FILENAME_MAX
290290
FIOASYNC
291-
FIODGNAME
291+
FIODNAME
292292
FIODTYPE
293293
FIOGETLBA
294294
FIOGETOWN
@@ -1044,7 +1044,6 @@ WNOWAIT
10441044
WSTOPPED
10451045
WTRAPPED
10461046
XUCRED_VERSION
1047-
XU_NGROUPS
10481047
YESEXPR
10491048
YESSTR
10501049
_IOFBF

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ s! {
106106
pub f_uid_uuid: ::uuid_t,
107107
}
108108

109-
#[deprecated(
110-
since = "0.2.107",
111-
note = "stat.st_blksize is an i64 and stat.st_qspare1 is replaced with \
112-
stat.st_blksize in DragonFly 5.8"
113-
)]
114109
pub struct stat {
115110
pub st_ino: ::ino_t,
116111
pub st_nlink: ::nlink_t,
@@ -128,11 +123,11 @@ s! {
128123
pub st_ctime_nsec: ::c_long,
129124
pub st_size: ::off_t,
130125
pub st_blocks: i64,
131-
pub st_blksize: u32,
126+
pub __old_st_blksize: u32,
132127
pub st_flags: u32,
133128
pub st_gen: u32,
134129
pub st_lspare: i32,
135-
pub st_qspare1: i64,
130+
pub st_blksize: i64,
136131
pub st_qspare2: i64,
137132
}
138133

@@ -772,9 +767,6 @@ pub const RLIMIT_POSIXLOCKS: ::c_int = 11;
772767
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
773768
pub const RLIM_NLIMITS: ::rlim_t = 12;
774769

775-
#[deprecated(since = "0.2.105", note = "Only exists on FreeBSD, not DragonFly BSD")]
776-
pub const XU_NGROUPS: ::c_int = 16;
777-
778770
pub const Q_GETQUOTA: ::c_int = 0x300;
779771
pub const Q_SETQUOTA: ::c_int = 0x400;
780772

@@ -944,11 +936,6 @@ pub const EV_EOF: u16 = 0x8000;
944936
pub const EV_SYSFLAGS: u16 = 0xf000;
945937

946938
pub const FIODNAME: ::c_ulong = 0x80106678;
947-
#[deprecated(
948-
since = "0.2.106",
949-
note = "FIODGNAME is not defined on DragonFly BSD. See FIODNAME."
950-
)]
951-
pub const FIODGNAME: ::c_ulong = 0x80106678;
952939

953940
pub const NOTE_TRIGGER: u32 = 0x01000000;
954941
pub const NOTE_FFNOP: u32 = 0x00000000;
@@ -1433,12 +1420,11 @@ extern "C" {
14331420

14341421
pub fn aio_waitcomplete(iocbp: *mut *mut aiocb, timeout: *mut ::timespec) -> ::c_int;
14351422

1436-
#[deprecated(since = "0.2.107", note = "len should be of type size_t")]
14371423
pub fn devname_r(
14381424
dev: ::dev_t,
14391425
mode: ::mode_t,
14401426
buf: *mut ::c_char,
1441-
len: ::c_int,
1427+
len: ::size_t,
14421428
) -> *mut ::c_char;
14431429

14441430
pub fn waitid(

src/unix/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,6 @@ extern "C" {
699699
all(target_os = "freebsd", any(freebsd11, freebsd10)),
700700
link_name = "fstat@FBSD_1.0"
701701
)]
702-
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
703702
pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;
704703

705704
pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int;
@@ -713,7 +712,6 @@ extern "C" {
713712
all(target_os = "freebsd", any(freebsd11, freebsd10)),
714713
link_name = "stat@FBSD_1.0"
715714
)]
716-
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
717715
pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
718716

719717
pub fn pclose(stream: *mut ::FILE) -> ::c_int;
@@ -798,7 +796,6 @@ extern "C" {
798796
all(target_os = "freebsd", any(freebsd11, freebsd10)),
799797
link_name = "fstatat@FBSD_1.1"
800798
)]
801-
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
802799
pub fn fstatat(
803800
dirfd: ::c_int,
804801
pathname: *const ::c_char,
@@ -990,7 +987,6 @@ extern "C" {
990987
all(target_os = "freebsd", any(freebsd11, freebsd10)),
991988
link_name = "lstat@FBSD_1.0"
992989
)]
993-
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
994990
pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int;
995991

996992
#[cfg_attr(

0 commit comments

Comments
 (0)