summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix `max_align_t` size and alignYuki Okushi2020-04-141-2/+2
|
* Use wasi values for `errno`sYuki Okushi2020-04-144-136/+210
|
* Update linksYuki Okushi2020-04-141-2/+2
|
* Remove `TCP_FASTOPEN_CONNECT` from emscriptenYuki Okushi2020-04-141-1/+0
|
* Remove `IPV6_FLOWINFO` from emscriptenYuki Okushi2020-04-143-1/+2
|
* Remove some items defined in `errqueue.h` from emscriptenYuki Okushi2020-04-143-21/+44
|
* Merge pull request #1729 from JohnTitor/licenseYuki Okushi2020-04-143-29/+0
|\ | | | | Remove license headers
| * Remove license headersYuki Okushi2020-04-113-29/+0
| |
* | Add bindings for POSIX regexesAlexander Batischev2020-04-138-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | Headers I used: Oh, for reference, here are the headers I used while working on this: - musl: https://git.musl-libc.org/cgit/musl/tree/include/regex.h?id=8327ae0cb23b799bc55a45e0d4bd95f5a2b1cdf1 - glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/regex.h;h=87cce7f5cb8cc3b678467329b479bd511e250e61;hb=HEAD - macOS: https://opensource.apple.com/source/Libc/Libc-997.90.3/include/regex.h.auto.html - FreeBSD: https://github.com/freebsd/freebsd/blob/8103b0ddb041617b7cd161528f0ff93ff32970a2/include/regex.h - NetBSD: https://github.com/NetBSD/src/blob/61c8f6fbb7e38b20e862d5cb3ed2203312963283/include/regex.h
* | unix: add strndup()Matthias Schiffer2020-04-111-0/+1
|/ | | | Add strndup(), as specified by POSIX.1-2008.
* Merge pull request #1716 from pfmooney/illumos-targetYuki Okushi2020-04-114-101/+162
|\ | | | | Split up Solaris and illumos targets
| * Split up Solaris and illumos targetsPatrick Mooney2020-04-034-101/+162
| |
* | Merge pull request #1728 from alexcrichton/add-ucontextYuki Okushi2020-04-112-1/+23
|\ \ | | | | | | Add definition of ucontext_t for aarch64-unknown-linux-gnu
| * | Add definition of ucontext_t for aarch64-unknown-linux-gnuAlex Crichton2020-04-102-1/+23
| | |
* | | This adds the defines from include/uapi/asm-generic/hugetlb_encode.h and the ↵Guillume DIDIER2020-04-093-2/+65
|/ / | | | | | | | | | | | | | | corresponding defines in include/uapi/linux/mman.h to linux_like/linux/gnu/mod.rs and the equivalent for musl in linux_like/linux/musl/mod.rs Solves #1700 Removes two defines from musl/b32/hexagon.rs that are now provided two mudules "up"
* | Add strsignal(3) to unixBrian Gavin2020-04-071-0/+1
| | | | | | | | | | This does not add sys_siglist because the docs specify that the function should be used instead, whenever possible.
* | Merge pull request #1720 from glebpom/linux-udp-constantsYuki Okushi2020-04-081-0/+8
|\ \ | | | | | | Add Linux UDP constants
| * | Add Linux UDP constantsGleb Pomykalov2020-04-061-0/+8
| | |
* | | Merge pull request #1717 from jclulow/illumos-cfmakerawYuki Okushi2020-04-081-6/+21
|\ \ \ | |/ / |/| | fix cfmakeraw() for illumos and Solaris
| * | fix cfmakeraw() for illumos and SolarisJoshua M. Clulow2020-04-041-6/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes two issues. First, the current cfmakeraw() implementation in this crate appears to be making a stack copy of the input "struct termios" before modifying it, rather than correctly modifying the original through the pointer. Before this modification the routine did not, thus, set the flags for raw mode. Second, we address the default settings of the MIN and TIME terminal options. On at least FreeBSD and Linux systems, the modern default value for MIN appears to be 1; i.e., block and wait for at least one input byte. On most Solaris and illumos systems, the MIN control character slot overlaps with EOF, and thus has a default value of 4. This breaks at least the examples in the "termion" crate, and probably quite a lot of other software written first and foremost for Linux systems. We need to force the MIN value to 1 while switching to raw mode.
* | linux: add fanotify(7) API bindings.Daniel McCarney2020-04-045-0/+92
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `fanotify` API[0] is a linux-specific API for notification and interception of filesystem events. In some ways it is similar to `inotify`, but with different advantages/tradeoffs. It is particularly well suited to full filesystem/mount monitoring (vs per directory) and for allowing/denying access to files (`inotify` lacks this capability). The `fanotify` API has been updated several times since it was enabled in Linux 2.6.37. Presently I've only included support for the original `fanotify` features, and the `FAN_MARK_FILESYSTEM` addition made in Linux 4.20. There are subsequent updates in 5.0 and 5.1 not covered in this initial commit. This commit adds the relevant constants and types from `uapi/linux/fanotify.h`[1] and two new functions (`fanotify_init`[2] and `fanotify_wrap`[3]) to `src/unix/linux_like/linux/mod.rs`. While I believe this API is also present on Android I have presently limited my attention to Linux. Although this commit focuses on Linux 4.20.x's `fanotify` API/constants I have skipped adding constants for `FAN_ALL_CLASS_BITS`, `FAN_ALL_INIT_FLAGS`, `FAN_ALL_MARK_FLAGS`, `FAN_ALL_EVENTS`, `FAN_ALL_PERM_EVENTS` and `FAN_ALL_OUTGOING_EVENTS` even though they are present in this kernel version's headers. These defines were deprecated[4] in later releases with instructions to not use them in new programs or extend them with new values. It would be a shame for new Rust programs to use deprecated #defines! [0]: http://man7.org/linux/man-pages/man7/fanotify.7.html [1]: https://github.com/torvalds/linux/blob/d54f4fba889b205e9cd8239182ca5d27d0ac3bc2/include/uapi/linux/fanotify.h [2]: http://man7.org/linux/man-pages/man2/fanotify_init.2.html [3]: http://man7.org/linux/man-pages/man2/fanotify_mark.2.html [4]: https://github.com/torvalds/linux/commit/23c9deeb3285d34fd243abb3d6b9f07db60c3cf4#diff-4c9ca62be6bf38cc08f7ea9daf16e379
* Merge pull request #1712 from pfmooney/cfg_attr-cleanupYuki Okushi2020-04-017-106/+0
|\ | | | | Clean up unnecessary link_name attributes
| * Clean up unnecessary cfg_attr attributesPatrick Mooney2020-03-298-130/+0
| |
* | Haiku: add futimens and utimensat, remove futimes and cleanup.Niels Sascha Reedijk2020-03-281-25/+7
|/ | | | | | * Function futimes is not available in Haiku. * Functions futimens and utimensat are. * Cleanup some leftover cfg_attr attributes.
* Merge pull request #1708 from pickfire/lockfYuki Okushi2020-03-271-0/+6
|\ | | | | Add Lockf POSIX to UNIX targets
| * Add lockfIvan Tham2020-03-261-0/+6
| | | | | | | | Fix #1631
* | Merge pull request #1705 from tormol/accept4allYuki Okushi2020-03-273-6/+12
|\ \ | | | | | | Add accept4() for NetBSD, Illumos and Solaris
| * | Add accept4() for NetBSD, Illumos and SolarisTorbjørn Birch Moltu2020-03-213-6/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | References: * NetBSD (became available with 8.0): http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/socket.h?annotate=1.129&only_with_tag=MAIN http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/accept4.c?annotate=1.2&only_with_tag=MAIN * Illumos: https://illumos.org/man/3socket/accept https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/socket.h https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libsocket/socket/weaks.c * Solaris: https://docs.oracle.com/cd/E88353_01/html/E37843/accept-3c.html
* | Add copy_file_range to linux_like/linux/gnuSergio Lopez2020-03-251-0/+8
|/ | | | | | | | | This is a Linux-only feature that was already present as a syscall. Add it just to linux/gnu for the moment, as the musl version bundled in the Rust's x86_64-unknown-linux-musl toolchain doesn't include it yet. Signed-off-by: Sergio Lopez <slp@redhat.com>
* Add definition of ucontext_t for macOSAlex Crichton2020-03-201-0/+102
|
* Remove MSVC's wmemchr declarationLzu Tao2020-03-182-1/+8
|
* Add constants from `linux/in.h`Yuki Okushi2020-03-171-0/+11
|
* Merge pull request #1653 from ArniDagur/shadow_reenterantYuki Okushi2020-03-172-1/+31
|\ | | | | Add reenterant shadow.h functions
| * Add renterant shadow functionsÁrni Dagur2020-03-152-1/+31
| |
* | Merge pull request #1694 from JohnTitor/map-syncYuki Okushi2020-03-1515-2/+14
|\ \ | | | | | | Tweak `MAP_SYNC`
| * | Tweak `MAP_SYNC`Yuki Okushi2020-03-1515-2/+14
| | |
* | | Add missing AT_ constantsThomas Hurst2020-03-144-0/+8
|/ / | | | | | | | | | | Add AT_EACCESS to Linux, Solaris, and Fuchsia. Add AT_SYMLINK_FOLLOW, AT_REMOVEDIR, and _AT_TRIGGER to Solaris.
* | Merge pull request #1658 from connorkuehl/unify-mmap-flagsYuki Okushi2020-03-142-3/+8
|\ \ | | | | | | Unify mmap flags
| * | Move mmap flag 'MAP_FIXED_NOREPLACE' from gnu/mod.rs to linux/mod.rsConnor Kuehl2020-03-132-1/+1
| | |
| * | Add mmap flag 'MAP_SYNC' to linux/mod.rsConnor Kuehl2020-03-131-0/+4
| | |
| * | Move mmap flag 'MAP_SHARED_VALIDATE' to linux/mod.rs from gnu/mod.rsConnor Kuehl2020-03-132-2/+3
| | |
* | | Merge pull request #1690 from pwang7/patch-1Yuki Okushi2020-03-141-0/+37
|\ \ \ | |/ / |/| | add macOS mount flags
| * | add macOS mount flags according toPu Wang2020-03-131-0/+37
| |/ | | | | | | https://github.com/apple/darwin-xnu/blob/master/bsd/sys/mount.h#L288
* | Add F_OFD_* constantsAndre Nathan2020-03-1019-0/+58
|/
* Merge pull request #1678 from jbaublitz/keyctl-constsYuki Okushi2020-03-102-0/+75
|\ | | | | Add constants from linux/keyctl.h
| * Add constants from linux/keyctl.hJohn Baublitz2020-03-092-0/+75
| |
* | Merge pull request #1661 from Richard-W/linux_reboot_h_constantsYuki Okushi2020-03-102-15/+16
|\ \ | | | | | | Move linux/reboot.h constants into linux module
| * | Move linux/reboot.h constants into linux moduleRichard Wiedenhöft2020-03-092-15/+16
| |/
* | Solarish: missing declaration of port_send and port_sendnVita Batrla2020-03-091-0/+12
|/
* Merge pull request #1682 from JohnTitor/reduce-fixmeYuki Okushi2020-03-095-21/+4
|\ | | | | Add `CLOCK_TAI` to linux_like/mod.rs