nix-rust / nix

Rust friendly bindings to *nix APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tracking Issue: Replace big `cfg!` chunks with shorter aliases

SteveLauC opened this issue · comments

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 (#2214)
  • src/errno.rs (#2214)
  • src/fcntl.rs (#2215)
  • src/features.rs src/ifaddrs.rs (#2215)
  • src/kmod.rs src/lib.rs (#2215)
  • src/macro.rs (#2215)
  • src/mqueue.rs (#2215)
  • src/poll.rs (#2215)
  • src/pty.rs (#2215)
  • src/sched.rs (#2215)
  • src/time.rs (#2215)
  • src/unistd.rs (#2216)
  • src/mount/bsd.rs (#2217)
  • src/mount/linux.rs src/mount/mod.rs (#2217)
  • src/net/if_.rs (#2217)
  • src/sys/aio.rs (#2218)
  • src/sys/epoll.rs (#2218)
  • src/sys/event.rs (#2218)
  • src/sys/mman.rs (#2218)
  • src/sys/mod.rs (#2218)
  • src/sys/resource.rs (#2218)
  • src/sys/sendfile.rs (#2218)
  • src/sys/signal.rs (#2218)
  • src/sys/stat.rs (#2219)
  • src/sys/statfs.rs (#2219)
  • src/sys/termios.rs (#2220)
  • src/sys/time.rs (#2229)
  • src/sys/uio.rs src/sys/wait.rs (#2221)
  • src/sys/ioctl/mod.rs (#2222)
  • src/sys/ptrace/mod.rs src/sys/ptrace/bsd.rs (#2222)
  • src/sys/socket/addr.rs (#2223)
  • src/sys/socket/mod.rs (#2224)
  • src/sys/socket/sockopt.rs (#2225)
  • test/common/mod.rs (#2230)
  • test/sys/mod.rs test/sys/test_socket.rs (#2230)
  • test/sys/test_sockopt.rs (#2230)
  • test/test.rs (#2230)
  • test/test_fcntl.rs (#2230)
  • test/test_net.rs test/test_poll.rs (#2230)
  • test/test_sendfile.rs (#2230)
  • test/test_stat.rs (#2230)
  • test/test_time.rs (#2230)
  • test/test_unistd.rs (#2230)