Description
Background
With the crate cfg_aliases
, we can replace common, chunky cfg!
s with shorter aliases, here are the aliases defined by us:
- apple_targets:
any(ios, macos, watchos, tvos)
- freebsdlike:
any(freebsd, dragonfly)
- bsd:
any(freebsd, dragonfly, netbsd, openbsd, apple_targets)
- linux_android:
any(linux, android)
- solarish:
any(illumos, solaris)
#2205 has done most of the replacements, but there are still cfg!
s that haven't been updated, we want to clear them all.
TODO
Scan our source code, and replace the long cfg!
chunks with shorter aliases:
-
src/dir.rs
src/env.rs
(refactor: cfg for dir/env/errno #2214) -
src/errno.rs
(refactor: cfg for dir/env/errno #2214) -
src/fcntl.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/features.rs
src/ifaddrs.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/kmod.rs
src/lib.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/macro.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/mqueue.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/poll.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/pty.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/sched.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/time.rs
(refactor: cfg for fcntl/fetures/ifaddrs/lib/poll/sched/time #2215) -
src/unistd.rs
(refactor: cfg for unistd.rs #2216) -
src/mount/bsd.rs
(refactor: cfg for mount/* & if_.rs #2217) -
src/mount/linux.rs
src/mount/mod.rs
(refactor: cfg for mount/* & if_.rs #2217) -
src/net/if_.rs
(refactor: cfg for mount/* & if_.rs #2217) -
src/sys/aio.rs
(refactor: cfg for aio/epoll/event/mman/mod/resource/sendfile/signal #2218) -
src/sys/epoll.rs
(refactor: cfg for aio/epoll/event/mman/mod/resource/sendfile/signal #2218) -
src/sys/event.rs
(refactor: cfg for aio/epoll/event/mman/mod/resource/sendfile/signal #2218) -
src/sys/mman.rs
(refactor: cfg for aio/epoll/event/mman/mod/resource/sendfile/signal #2218) -
src/sys/mod.rs
(refactor: cfg for aio/epoll/event/mman/mod/resource/sendfile/signal #2218) -
src/sys/resource.rs
(refactor: cfg for aio/epoll/event/mman/mod/resource/sendfile/signal #2218) -
src/sys/sendfile.rs
(refactor: cfg for aio/epoll/event/mman/mod/resource/sendfile/signal #2218) -
src/sys/signal.rs
(refactor: cfg for aio/epoll/event/mman/mod/resource/sendfile/signal #2218) -
src/sys/stat.rs
(refactor: cfg for stat/statfs #2219) -
src/sys/statfs.rs
(refactor: cfg for stat/statfs #2219) -
src/sys/termios.rs
(refactor: cfg for termios.rs #2220) -
src/sys/time.rs
(refactor: cfg for sys/time.rs #2229) -
src/sys/uio.rs
src/sys/wait.rs
(refactor: cfg for time/uio/wait #2221) -
src/sys/ioctl/mod.rs
(refactor: cfg for ioctl/* & ptrace/* #2222) -
src/sys/ptrace/mod.rs
src/sys/ptrace/bsd.rs
(refactor: cfg for ioctl/* & ptrace/* #2222) -
src/sys/socket/addr.rs
(refactor: cfg for socket/addr.rs #2223) -
src/sys/socket/mod.rs
(refactor: cfg for socket/mod.rs #2224) -
src/sys/socket/sockopt.rs
(refactor: cfg for socket/sockopt.rs #2225) -
test/common/mod.rs
(refactor: cfg for test/* #2230) -
test/sys/mod.rs
test/sys/test_socket.rs
(refactor: cfg for test/* #2230) -
test/sys/test_sockopt.rs
(refactor: cfg for test/* #2230) -
test/test.rs
(refactor: cfg for test/* #2230) -
test/test_fcntl.rs
(refactor: cfg for test/* #2230) -
test/test_net.rs
test/test_poll.rs
(refactor: cfg for test/* #2230) -
test/test_sendfile.rs
(refactor: cfg for test/* #2230) -
test/test_stat.rs
(refactor: cfg for test/* #2230) -
test/test_time.rs
(refactor: cfg for test/* #2230) -
test/test_unistd.rs
(refactor: cfg for test/* #2230)