Commit 1a5468f
committed
Auto merge of #2367 - rtzoeller:unused_in_dfly, r=JohnTitor
Clarify that MAP_RENAME and MAP_NORESERVE are deprecated in DragonFlyBSD
MAP_RENAME and MAP_NORESERVE are marked as deprecated for freebsdlike, but the note only mentions FreeBSD. Clarify the status of these constants on DragonFlyBSD.
From the EFnet #dragonflybsd channel:
```
<rtzoeller> Hi all, I've got a question about how some DragonFlyBSD #define's are being reflected in Rust's libc, and what the expected behavior should be.
<rtzoeller> Rust's libc has marked MAP_RENAME and MAP_NORESERVE as deprecated/removed for both FreeBSD and DragonFlyBSD, perhaps erroneously. https://github.com/rust-lang/libc/blob/2cffe84529fb86a150c6848409d75aa96d237944/src/unix/bsd/freebsdlike/mod.rs#L990
<rtzoeller> DragonFlyBSD hasn't removed these, so ostensibly the answer is to just mark them as not deprecated in Rust's libc.
<rtzoeller> At the same time, I can't find any usage of them in the rest of the DragonFlyBSD kernel... so maybe they are deprecated in practice, but not officially?
<rtzoeller> Ultimately the question is: should Rust's libc advertise MAP_RENAME and MAP_NORESERVE for DragonFlyBSD, or should it mark them as deprecated like it does for FreeBSD?
<rtzoeller> DragonFlyBSD's definition of them: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/c163a4d7ee9c6857ee4e04a3a2cbb50c3de29da1/sys/sys/mman.h#L86
<swildner`> rtzoeller: git log -S shows that we only inherited the defines from freebsd but never implemented them either, so they can be marked deprecated for dfly too
```
The existing note has evidently caused some confusion, as the nix crate excludes these constants for FreeBSD but not for DragonFlyBSD.1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
989 | | - | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
990 | 993 | | |
991 | 994 | | |
992 | | - | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
993 | 999 | | |
994 | 1000 | | |
995 | 1001 | | |
| |||
0 commit comments