Commit Graph

481 Commits

Author SHA1 Message Date
Fredrik Fornwall
a848efd351 Add regex.h to libc-test for Android 2020-08-16 11:36:10 +02:00
Joshua M. Clulow
1f0ea0da73 add openpty and forkpty implementation for illumos systems
At time of writing, illumos systems do not provide an implementation of
the openpty() and forkpty() wrappers provided on some other UNIX
systems.  While we expect to grow an implementation, it seems prudent to
provide a compatibility routine here first to unblock illumos support in
the popular nix crate.
2020-08-05 20:39:45 -07:00
Alan Somers
554ea4b8bd Deprecate CTL_P1003_1B_MAXID
It's been removed in FreeBSD 13 (svn r363622), and never had any
legitimate use outside of the base system anyway.
2020-07-27 14:59:32 -06:00
Yuki Okushi
53f569989b
Run rustfmt 2020-07-27 03:27:52 +09:00
Yuki Okushi
65be52f339
Merge pull request #1830 from JohnTitor/utmpx
Declare `utmpx` on musl
2020-07-24 04:45:34 +09:00
Yuki Okushi
05c4574f3a
Declare utmpx on musl 2020-07-22 09:51:21 +09:00
Stefano Garzarella
45db822a18 Skip test for "VMADDR_CID_RESERVED" and "VMADDR_CID_LOCAL"
VMADDR_CID_RESERVED is NOT available from Linux v5.6.
VMADDR_CID_LOCAL is available only on Linux >= v5.6.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2020-07-20 21:33:02 +02:00
Simonas Kazlauskas
91fee24f12
Move the SEAL constants to freebsd12 module 2020-07-20 01:16:47 +09:00
Simonas Kazlauskas
6b14cfbf93
Add some missing fcntl flags for freebsd 2020-07-20 01:14:26 +09:00
Patrick Mooney
e1b9757128 Expose EPOLLEXCLUSIVE on illumos platform
Initially the EPOLLEXCLUSIVE definition was hidden on the illumos
platform as it lacked explicit support.  After further review, it was
concluded that EPOLLEXCLUSIVE can safely be considered a no-op, when not
fully implemented by the OS, making it safe for use on illumos.
2020-07-17 18:28:33 +00:00
Yuki Okushi
0c2027f05a
Merge pull request #1811 from sunfishcode/wasi-more
Add more WASI libc definitions.
2020-07-07 07:04:08 +09:00
Dan Gohman
753ad8205f Add more WASI libc definitions.
This adds various WASI libc definitions to the Rust libc bindings that I
needed while porting some applications to WASI.

It also removes the `pause` binding since newer versions of WASI libc
have removed this function as well. (WASI currently has no syscall with
this functionality.)
2020-07-06 05:50:17 -07:00
Greg V
9fc2574548 FreeBSD: chase CTL_UNSPEC to CTL_SYSCTL, IPPROTO_SEP to IPPROTO_DCCP renames
Plus, add new constants for sysctls that give names to existing magic numbers.

https://reviews.freebsd.org/rS350749
https://reviews.freebsd.org/rS352486
2020-07-06 15:31:37 +03:00
Greg V
1e66be9c45 FreeBSD: add ucontext.h to libc-test
It was picked up transitively on >10, but tests failed on 10
2020-07-06 15:31:37 +03:00
Andrew Walbran
51acd7f488 Android: Add various constants and functions.
In particular:
Add timerfd constants and functions, from sys/timerfd.h.
Add EFD_SEMAPHORE and group all EFD_ constants together.
Add sigtimedwait function, from signal.h.
Add missing fallocate constants and functions, from linux/falloc.h and fcntl.h.
Add xattr functions, from sys/xattr.h.
Add SCHED_ and SEEK_ constants, from linux/sched.h and bits/seek_constants.h.
Add rlimit functions, from sys/resource.h.
Add RENAME_ constants, from stdio.h.
Add ino64_t type, from sys/types.h.
2020-06-30 17:56:11 +01:00
Yuki Okushi
b6396caf31
Merge pull request #1792 from jasonbking/cmsg 2020-06-27 19:17:32 +09:00
Jason King
40c46f4306 Add ancillary socket data accessor functions for solarish OSes 2020-06-26 20:58:43 +00:00
Simon Wörner
4a9413ba54 added freebsd register structs 2020-06-22 17:33:09 +02:00
Patrick Mooney
b53ccb8740 illumos: Add eventfd support 2020-06-09 20:57:33 +00:00
Yuki Okushi
c6fb0f37ad
Run rustfmt 2020-06-02 20:37:34 +09:00
Yuki Okushi
a6920f9a5a
Use ctest2 to drop old dependencies 2020-06-02 01:10:08 +09:00
Yuki Okushi
c4aed601f5
Change branch specification 2020-05-28 05:21:45 +09:00
Yuki Okushi
8d3cc4b527
Update FIXME comment 2020-05-23 12:32:55 +09:00
Yuki Okushi
f8f9a8e6f6
Merge pull request #1768 from Erk-/freebsd-getnameinfo-flags
[FreeBSD] Add missing getnameinfo() flag values.
2020-05-22 00:16:19 +09:00
Valdemar Erk
5fec4c3691 [FreeBSD] Add missing getnameinfo() flag values.
This patchs adds missing flag values for getnameinfo()
on FreeBSD, the following flags have been added from
the FreeBSD tree.

 /*
  * Flag values for getnameinfo()
  */
 #define	NI_NOFQDN	0x00000001
 #define	NI_NUMERICHOST	0x00000002
 #define	NI_NAMEREQD	0x00000004
 #define	NI_NUMERICSERV	0x00000008
 #define	NI_DGRAM	0x00000010
 #define	NI_NUMERICSCOPE	0x00000020

Signed-off-by: Valdemar Erk <valdemar@erk.io>
2020-05-21 14:38:13 +02:00
Yuki Okushi
1528539b0a
Ignore fns that have suddenly disappeared on Android CI 2020-05-21 15:29:10 +09:00
Yuki Okushi
b12c35f0cd
Skip test for mode field of ipc_perm 2020-04-30 14:27:59 +09:00
Yuki Okushi
b05f659361
Skip some items changed in glibc 2.31 2020-04-21 12:18:40 +09:00
Yuki Okushi
e69c5eaa9f
Merge pull request #1734 from JohnTitor/docs
Minor clean-up CI docs
2020-04-14 09:04:42 +09:00
Yuki Okushi
1ef129b210
Minor clean-up CI docs 2020-04-14 03:23:50 +09:00
Yuki Okushi
622e6f5d25
Update node to v12.16.2 2020-04-14 02:48:35 +09:00
Yuki Okushi
991678ce0b
Skip test for SYS_gettid 2020-04-14 02:48:35 +09:00
Alexander Batischev
fda521b9d2 Add bindings for POSIX regexes
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: 8103b0ddb0/include/regex.h
- NetBSD: 61c8f6fbb7/include/regex.h
2020-04-13 15:57:58 +03:00
Yuki Okushi
27f89544a8
Run rustfmt 2020-04-11 22:13:58 +09:00
Yuki Okushi
9782b7ff8f
Merge pull request #1716 from pfmooney/illumos-target
Split up Solaris and illumos targets
2020-04-11 19:09:29 +09:00
Guillume DIDIER
c646f96fdf This adds the defines from include/uapi/asm-generic/hugetlb_encode.h and the 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"
2020-04-09 18:10:27 +02:00
Yuki Okushi
a8978051d6
Use fork ctest until the maintainer gets back 2020-04-08 07:11:14 +09:00
Daniel McCarney
5c7a82a1c8 linux: add fanotify(7) API bindings.
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]: d54f4fba88/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]: 23c9deeb32 (diff-4c9ca62be6bf38cc08f7ea9daf16e379)
2020-04-04 16:07:09 -04:00
Patrick Mooney
48594dc7c1 Update ctest for illumos and Solaris 2020-04-03 13:16:58 +00:00
Yuki Okushi
52270b06e2
Enable s390x-unknown-linux-gnu on CI 2020-03-15 15:10:50 +09:00
John Baublitz
47c0d4ae81 Add constants from linux/keyctl.h 2020-03-09 11:00:46 -04:00
zonyitoo
47e2f8b922 Add IP6T_SO_ORIGINAL_DST definition 2020-03-08 18:31:25 +08:00
Daniel Fox Franke
51f1aa42c0 Add <sys/timex.h> declarations for Solaris/IllumOS 2020-03-01 14:23:07 -05:00
Daniel Fox Franke
b2740e263d Add <sys/timex.h> declarations for Linux 2020-03-01 13:35:39 -05:00
Daniel Fox Franke
2fe7865372 Include <sys/timex.h> in libc-test 2020-03-01 11:45:33 -05:00
Michal 'vorner' Vaner
35db4e45c7
Nfnetfilter queue constants
Constants for the linux nfqueue netlink protocol (userspace firewall).

Continuation of #1562 and #1571.
2020-03-01 12:43:33 +01:00
Yuki Okushi
9f9a5edcee Skip some items changed in Catalina 2020-03-01 00:19:09 +09:00
Yuji Yamamoto
338dd7c085
Add ucontext.h to test target 2020-02-28 15:59:48 +09:00
Yuki Okushi
72448d2885 Skip statx and statx_timestamp for now 2020-02-25 16:44:21 +09:00
Yuki Okushi
804a11dc89 Ignore sys/io.h on gnuabihf 2020-02-25 16:44:21 +09:00