Commit Graph

200 Commits

Author SHA1 Message Date
Bryant Mairs
12cfa1ef46 Add BOTHER to Android & Linux 2017-10-18 20:57:34 -07:00
Alex Crichton
9029cfb9eb Add more Linux-based syscall tables
* Add syscall tables to most remaining arches in `src/unix/notbsd`
* Add aarch64/arm musl to CI
* Update dependencies
2017-10-18 15:17:00 -07:00
Joerg Thalheim
8c24117c63 define SYS_renameat2 + flags on linux
Motivation: there is no glibc wrapper for this syscall
2017-10-16 19:20:35 +01:00
Vojtech Kral
4ed612c124 Fix glibc 2.26 incompatibilities #788 2017-10-09 20:38:56 +02:00
Jack Pappas
787addfa38 Add DCCP constant definitions. 2017-09-20 21:58:29 -04:00
bors
d5236b0b91 Auto merge of #761 - LeoTindall:add_linux_iff_constants, r=alexcrichton
Add additional interface flags (IFF_)

Adds the three missing IFF_ constants (IFF_LOWER_UP, IFF_DORMANT, and IFF_ECHO) per nix-rust/nix#764
2017-09-12 19:39:52 +00:00
SilverWingedSeraph
6f170efdcf Prevent testing linux/if.h definitions on musl targets 2017-09-12 12:39:09 -05:00
SilverWingedSeraph
121795e34c Add tests for linux/if.h for additional IFF_ flags
Also remove unneeded platform gating
2017-09-12 09:15:45 -05:00
slyrz
340cbbfe75 Add timerfd API on Linux
This change adds the Linux-specific timerfd API to libc.
2017-09-09 13:02:29 +02:00
Bryant Mairs
bd4c3489e5 Add QFMT_VFS_V1 on MIPS and test all QFMT_ constants 2017-08-29 19:33:22 -07:00
Alex Crichton
305cec31fb Fix musl build 2017-08-27 09:28:17 -07:00
Alex Crichton
22b98dedfe Add asmjs/wasm32 to CI
Rebase of #610 and also move emscripten up much higher in the hierarchy to
ensure that it doesn't have too much of a ripple effect on other platforms.

This involved moving down a good number of definitions, but hopefully was done
with care to not break anything!
2017-08-26 22:15:29 -07:00
Alex Crichton
ce276177f2 Remove warnings in libc-test 2017-08-21 21:41:26 -07:00
Bryant Mairs
2e11d9e14c Add more fcntl and seal constants for Android/Linux
We now create an additional binary `linux_fcntl` for testing this
since there are header conflicts when including all necessary headers.
This binary is run on all platforms even though it's empty on all non-
Android/non-Linux platforms.

Testing has been switched from a custom binary to using a runner-less
test (or pair of tests). This means that for local development a simple
`cd libc-test && cargo test` will run all the tests. CI has also been
updated here to reflect that.
2017-08-20 20:52:43 -07:00
Alex Crichton
201d539465 Remove OpenBSD CI
It's now broken due to changes in the `gcc` crate and having a too-old compiler,
and in general it's unfortunately architecturally so different from the other
test frameworks that it's difficult to maintain over time.
2017-08-18 09:34:08 -07:00
Sébastien Marie
7e349c0be6 Add exception in testsuite: the constants are new
they will be released with OpenBSD 6.2
2017-08-13 13:54:04 +02:00
Sébastien Marie
56701a7f70 skip siginfo_t.si_addr type check on OpenBSD
the type changed from *c_char to *c_void in 6.1
2017-08-13 12:29:45 +02:00
Bryant Mairs
c9e6f55f1c Add MADV_FREE and MADV_SOFT_OFFLINE for Android/Linux 2017-08-10 19:21:22 -07:00
bors
0dae0e75bd Auto merge of #708 - wezm:remove-missing-openbsd-constants, r=alexcrichton
Add KERN_USERMOUNT and KERN_ARND to don't check list on OpenBSD

These [two constants are no longer in OpenBSD](3f376b0849/sys/sys/sysctl.h (L133-L140)). They were preventing the the tests from passing. With this change the test now pass:

```
CC=egcc cargo run
   Compiling libc v0.2.29 (file:///home/vagrant/libc)
   Compiling libc-test v0.1.0 (file:///home/vagrant/libc/libc-test)
    Finished debug [unoptimized + debuginfo] target(s) in 11.7 secs
     Running `/home/vagrant/libc/target/debug/libc-test`
RUNNING ALL TESTS
PASSED 5935 tests
```

They are still present in bitrig so I moved them there.
2017-08-04 10:40:32 +00:00
Wesley Moore
58c772bd51 Add KERN_ARND and KERN_USERMOUNT to don't check list on OpenBSD 2017-08-03 18:14:15 +10:00
Marcin Mielniczuk
b9166f42ff Include sys/reg.h on Android. 2017-08-01 16:20:13 +02:00
bors
0b7abd9bb3 Auto merge of #689 - lucab:ups/fexecve, r=alexcrichton
unix: add fexecve()

Add missing fexecve() - execute program specified via file descriptor.

Reference: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html
2017-07-23 15:18:51 +00:00
bors
9bbfe4b0ee Auto merge of #686 - marmistrz:regs, r=alexcrichton
Add offsets in user_regs_struct from sys/reg.h
2017-07-22 17:01:15 +00:00
Luca Bruno
858d47cd95
unix: add fexecve()
Add missing fexecve() - execute program specified via file descriptor.

Reference: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html
2017-07-22 08:12:10 +00:00
Marcin Mielniczuk
2a5976727f Define i686 when TARGET=i686* 2017-07-22 09:37:22 +02:00
Marcin Mielniczuk
37b4e73a10 include sys/regs.h only on x86 and x86_64 2017-07-21 21:55:47 +02:00
Marcin Mielniczuk
1535ee8703 Include sys/user.h in the automatic test 2017-07-21 17:11:30 +02:00
bors
516df7f773 Auto merge of #671 - Susurrus:signalfd_android, r=alexcrichton
Add signalfd and related to android
2017-07-20 19:05:46 +00:00
Bryant Mairs
83ab9a341f Add signalfd and related to android 2017-07-20 08:56:06 -07:00
bors
57413b8b14 Auto merge of #673 - g2p:fallocate-flags, r=alexcrichton
Add all current fallocate flags

Also move them to the common Linux module, as they are not platform-specific.
See include/uapi/linux/falloc.h.
2017-07-20 14:05:21 +00:00
Gabriel
f60ff2db55 Ignore newer kernel constants if building with musl 2017-07-20 00:28:08 +02:00
Guillaume Gomez
100f3f29cf Add mac structs 2017-07-19 20:54:24 +02:00
Gabriel
75e3696eca Include linux/falloc.h directly
glibc support is behind, as indicated by
https://github.com/karelzak/util-linux/blob/master/sys-utils/fallocate.c
2017-07-19 06:52:12 +02:00
Guillaume Gomez
e7df808d68 Add header for mac targets 2017-07-16 22:22:32 +02:00
Bryant Mairs
f04b44292e Add CMSPAR to linux/mips
It needs to be skipped during testing because there's no way to include
a combination of headers that will expose it without giving a "type has
already been defined" error.
2017-07-13 11:18:00 -07:00
Nicolas Dusart
9f5766fb3f add missing socket constants 2017-07-10 10:52:20 +02:00
Nicolas Dusart
4abc3cefef Update to NDK r15b (with unified headers) and add missing symbols needed by nix crate 2017-07-03 13:26:35 +02:00
Mateusz Sieczko
60d93226ff Add structs defined in linux/input.h 2017-06-14 21:48:41 +02:00
bors
439a4d7d4b Auto merge of #608 - Uplifting:unix, r=alexcrichton
add a number of linux syscalls

vfork, wait4, getresuid, getresgid, personality, vhangup,
swapon, swapoff, getdomainname, setdomainname, iopl, ioperm
2017-06-08 15:56:42 +00:00
Andrew Salmon
553c5dc877 sys/io.h only in linux x86_64
Make changes to reflect this
2017-06-07 19:27:14 -07:00
Andrew Salmon
c98b9f7d4e add a number of syscalls
vfork, wait4, getresuid, getresgid, personality, vhangup,
swapon, swapoff, getdomainname, setdomainname, iopl, ioperm
2017-06-07 16:26:42 -07:00
bors
80e1422851 Auto merge of #599 - xd009642:master, r=alexcrichton
Adding missing structs from linux/user.h

Adding structs from linux/user.h (or sys/user.h depending on OS version). This adds the linux user_regs_struct and user struct from sys/user.h into libc for x86 and x86_64. Also, bumping the version number.

As an aside, I was wondering if this was also the right place to add the bit offsets for the [EFLAGS register ](https://en.wikibooks.org/wiki/X86_Assembly/X86_Architecture#EFLAGS_Register)? These aren't defined anywhere in the linux system libraries instead the definition seems to just be in the x86 and x86_64 documentation but they are useful for anyone looking to interpret eflags. If libc is the right place for these constants I'd like the opportunity to add them before it's merged in. :)
2017-05-30 13:57:31 +00:00
Daniel McKenna
6acbf873db Fixed issues in test and struct names.
Fixed the issues that prevented the libc_tests that are generated from passing. Also, fixed struct names and types to be representative of the linux source files.
2017-05-29 18:27:27 +01:00
Andrew Salmon
6fb7c90ad0 sys/times.h, setreuid/setregid, and sigpending 2017-05-26 15:24:54 -07:00
Andrew Salmon
bc48202e14 remove getitimer and setitimer
_GNU_SOURCE works differently than other libraries and creates
function pointer issues
2017-05-26 12:47:53 -07:00
bors
fda4049c11 Auto merge of #596 - Susurrus:master, r=alexcrichton
Use NOCANCEL variants for close on Mac

The default `close()` on OS X does not provide clear errors, instead the `$NOCANCEL` variants should be used. These are available as of OS X 10.6 onwards.

Fixes #595.
2017-05-19 14:10:33 +00:00
Bryant Mairs
9b9f36aefc Use NOCANCEL variants for close on Mac
The default  on OS X does not provide clear errors,
instead the NOCANCEL variants should be used. These are available
as of OS X 10.6 onwards.
2017-05-18 12:04:28 -07:00
Lee Bousfield
98889cf243 Add ENOATTR for Linux 2017-05-18 09:02:25 -06:00
bors
19f3be3638 Auto merge of #578 - cactorium:master, r=alexcrichton
Steps towards support for musl-unknown-linux-uclibc

Hello! I've been working towards resolving https://github.com/rust-lang/libc/issues/361 , this PR compiles successfully with a newish compiler (with some minor fixes in `gcc`, `ctest`), and all the tests pass for `libc-ctest`. Basically most of the undefined functions, constants, and structs were just removed from the ctest, and then any constants that weren't correct were fixed. Would it make more sense to conditionally remove them from libc? I wasn't sure when it was appropriate to skip the test for it instead of removing the function/constants, so I just removed all the tests for now because that was a little easier than hunting them down. I'm also guessing the way some of the constants were conditionally set wasn't the correct style, would you guys have any advice on how to do it more correctly? Lemme know how it looks!
2017-05-08 14:49:12 +00:00
Lee Bousfield
fdbfe8fc91 Add xattr functions for OSX 2017-05-07 17:05:51 -06:00