Skip to content

Commit 45cd3dc

Browse files
committed
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.
1 parent 25ea72c commit 45cd3dc

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
@@ -281,7 +281,7 @@ Elf64_Word
281281
Elf64_Xword
282282
FILENAME_MAX
283283
FIOASYNC
284-
FIODGNAME
284+
FIODNAME
285285
FIODTYPE
286286
FIOGETLBA
287287
FIOGETOWN
@@ -1037,7 +1037,6 @@ WNOWAIT
10371037
WSTOPPED
10381038
WTRAPPED
10391039
XUCRED_VERSION
1040-
XU_NGROUPS
10411040
YESEXPR
10421041
YESSTR
10431042
_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

@@ -724,9 +719,6 @@ pub const RLIMIT_POSIXLOCKS: ::c_int = 11;
724719
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
725720
pub const RLIM_NLIMITS: ::rlim_t = 12;
726721

727-
#[deprecated(since = "0.2.105", note = "Only exists on FreeBSD, not DragonFly BSD")]
728-
pub const XU_NGROUPS: ::c_int = 16;
729-
730722
pub const Q_GETQUOTA: ::c_int = 0x300;
731723
pub const Q_SETQUOTA: ::c_int = 0x400;
732724

@@ -888,11 +880,6 @@ pub const EV_EOF: u16 = 0x8000;
888880
pub const EV_SYSFLAGS: u16 = 0xf000;
889881

890882
pub const FIODNAME: ::c_ulong = 0x80106678;
891-
#[deprecated(
892-
since = "0.2.106",
893-
note = "FIODGNAME is not defined on DragonFly BSD. See FIODNAME."
894-
)]
895-
pub const FIODGNAME: ::c_ulong = 0x80106678;
896883

897884
pub const NOTE_TRIGGER: u32 = 0x01000000;
898885
pub const NOTE_FFNOP: u32 = 0x00000000;
@@ -1375,12 +1362,11 @@ extern "C" {
13751362

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

1378-
#[deprecated(since = "0.2.107", note = "len should be of type size_t")]
13791365
pub fn devname_r(
13801366
dev: ::dev_t,
13811367
mode: ::mode_t,
13821368
buf: *mut ::c_char,
1383-
len: ::c_int,
1369+
len: ::size_t,
13841370
) -> *mut ::c_char;
13851371

13861372
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)