Commit Graph

1199 Commits

Author SHA1 Message Date
Jessica Hamilton
7bff2dcdbf haiku: add missing pathconf constants. 2017-09-25 23:28:37 +00:00
bgermann
4a58331883 Add utimensat for Solaris 2017-09-24 11:38:38 +02:00
Jessica Hamilton
7b2ecc6596 haiku: add missing sysconf constants. 2017-09-22 23:12:06 +00:00
Martin Ek
585e7528a7 Remove clock_settime from macOS
Doesn't work on iOS.
2017-09-21 19:52:46 +02:00
Martin Ek
ffba97f984 Add clock_gettime related functions to macOS 2017-09-21 17:04:46 +02:00
bors
ef6c2527de Auto merge of #770 - jack-pappas:dccp, r=alexcrichton
Define DCCP constants

This PR defines constants needed to utilize [DCCP](https://en.wikipedia.org/wiki/Datagram_Congestion_Control_Protocol) in Linux and NetBSD.
2017-09-21 03:34:22 +00:00
Jack Pappas
787addfa38 Add DCCP constant definitions. 2017-09-20 21:58:29 -04:00
bors
322e59f065 Auto merge of #769 - redox-os:master, r=alexcrichton
[Redox] add net functions, fcntl, and close

This adds net functions and two file functions: fcntl and close.

It also adds related constants.

The net functions are in a separate file for better organization.
2017-09-20 03:04:39 +00:00
Jeremy Soller
d18565cf6f Fix style 2017-09-19 19:13:27 -06:00
James Tucker
43ed4ddce8 fuchsia: mxio was renamed to fdio 2017-09-19 14:01:54 -07:00
bors
ba1d2f1f6a Auto merge of #762 - jack-pappas:ipproto, r=alexcrichton
Define additional IPPROTO_* constants.

Define additional IPPROTO_* constants, e.g. for DCCP and SCTP. These constants are standard across all system types -- the values are those assigned to the protocol by the IANA:
https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
2017-09-18 04:12:52 +00:00
Jack Pappas
e8dd192440 Define additional IPPROTO_* constants. 2017-09-17 13:05:20 -04:00
Tamir Duberstein
8e26ee6e54
Bring back cfg_target_vendor, which is still used 2017-09-17 07:41:05 -04:00
Jeremy Soller
75b5c29332 Add more net functions for net2 2017-09-16 16:15:40 -06: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
121795e34c Add tests for linux/if.h for additional IFF_ flags
Also remove unneeded platform gating
2017-09-12 09:15:45 -05:00
Tamir Duberstein
8a7069f91e
Make stdbuild a cargo feature 2017-09-12 09:48:21 -04:00
Tamir Duberstein
0b2fe458a1
Prune features used by stdbuild 2017-09-11 21:15:01 -04:00
Tamir Duberstein
8d14ac5e55
Whitespace 2017-09-11 21:14:38 -04:00
SilverWingedSeraph
cf590691fb Make additional IFF_ constants conditional on processor architecture. 2017-09-10 09:38:09 -05:00
SilverWingedSeraph
bbed813c17 Move extra IFF_ definitions to be Linux only. 2017-09-10 08:35:51 -05:00
SilverWingedSeraph
f533729267 Add additional interface flags (IFF_) 2017-09-09 21:44:37 -05:00
bors
82cae67621 Auto merge of #759 - slyrz:master, r=alexcrichton
Add timerfd API on Linux

This change adds the Linux-specific timerfd API to libc.

```C
#include <sys/timerfd.h>

int timerfd_create(int clockid, int flags);
int timerfd_gettime(int fd, struct itimerspec *curr_value);
int timerfd_settime(int fd, int flags,
                    const struct itimerspec *new_value,
                    struct itimerspec *old_value);
```

The timerfd API has been available since kernel 2.6.25 and in glibc since version 2.8.

I'm not sure if I put the changes in the right places, so please review with great care.
2017-09-09 21:51:54 +00:00
slyrz
de6fa494af Map timerfd constants to their fcntl counterparts 2017-09-09 20:41:09 +02:00
Jamie Hewland
6da0389cba Linux/Android: re-add initgroups 2017-09-09 15:38:15 +02: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
Alex Crichton
95848f9622 Merge pull request #758 from humenda/uclibc_networking
Add networking symbols for uclibc/x86_64
2017-09-06 13:39:22 -05:00
Alex Crichton
39dba5f15a Merge pull request #755 from bgermann/master
Add Solaris 10 support
2017-09-06 13:39:10 -05:00
Sebastian Humenda
dee3699228 Add networking symbols for uclibc/x86_64 2017-09-06 16:26:18 +02:00
bgermann
eac505625b Add pthread_create for Solaris 2017-09-04 20:55:50 +02:00
Jessica Hamilton
17c74f499d haiku: res_init link name is __res_init. 2017-09-03 16:29:19 -05:00
Jessica Hamilton
07a430325c haiku: add missing POSIX errors, reorder to match header. 2017-09-03 16:29:19 -05:00
Jessica Hamilton
b24c5888cd haiku: add missing SOCK_SEQPACKET. 2017-09-03 16:29:19 -05:00
Jessica Hamilton
ab7925f8ea haiku: add missing pthread_create. 2017-09-03 16:29:19 -05:00
Jessica Hamilton
dc2e747b2a haiku: time_t is now 64-bit on x86_64. 2017-09-03 16:29:19 -05:00
bgermann
deb61c8709 Add memalign for Solaris
Unlike Illumos and Solaris 11, Solaris 10 does not support posix_memalign, so this change is needed for Solaris 10 support.
2017-09-03 15:11:24 +02:00
bors
e102a72651 Auto merge of #749 - joshlf:mach-vm-flags, r=alexcrichton
apple: Add VM_* constants from mach/vm_statistics.h

Closes #736.
2017-08-31 00:37:07 +00:00
Alex Crichton
e5d4c13941 Fix compile on sparc64 2017-08-30 16:59:05 -07:00
Joshua Liebow-Feeser
f8bfc6eaa4 apple: Add VM_* constants from mach/vm_statistics.h
Closes #736
2017-08-30 16:04:21 -07:00
Andy Grover
b5bb3b4a1d Fix dev_t minor() bitmasking on Linux
This code appears to be modeled on the macros in glibc bits/sysmacros.h
(since Glibc 2.26). Fix the masking of bits for minor() to match that
implementation, which also corresponds with the explanatory comment in
that file.
2017-08-30 14:49:19 -07:00
bors
c17711e5fb Auto merge of #748 - Susurrus:QCMD, r=alexcrichton
Add QCMD() for available platforms

Exists where `Q_QUOTAON` also exists, so added it for those same platforms.
2017-08-30 04:15:37 +00:00
Bryant Mairs
aa74435141 Add QCMD() for available platforms 2017-08-29 20:14:29 -07:00
Bryant Mairs
bd4c3489e5 Add QFMT_VFS_V1 on MIPS and test all QFMT_ constants 2017-08-29 19:33:22 -07:00
bors
1c1413e961 Auto merge of #745 - xd009642:master, r=alexcrichton
Updated types of PTRACE requests for musl to be consistent.

For some reason the type of ptrace request constants in musl change for the register based requests. As they are used in the same way and this doesn't mimic musl this has been changed for consistency and ease of use.

First raised in issue #744
2017-08-27 17:32:11 +00:00
bors
d64716407e Auto merge of #742 - alexcrichton:wasm, r=alexcrichton
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-27 17:00:24 +00:00
xd009642
86b1213196 Updated types of PTRACE requests for musl to be consistent.
For some reason the type of ptrace request constants in musl change for the register based requests. As they are used in the same way and this doesn't mimic musl this has been changed for consistency and ease of use.
2017-08-27 17:21:44 +01:00
Alex Crichton
4c90a7350e Add emscripten/wasm to dox builds 2017-08-27 08:36:18 -07:00
Alex Crichton
1ee80568ef Fix style 2017-08-27 08:33:58 -07:00
Bryant Mairs
deb30e5b39 Add syscall constants to more Android/Linux targets 2017-08-27 01:12:39 -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
bors
2f4ca8788b Auto merge of #741 - kallisti5:haiku-sigfix, r=alexcrichton
haiku: Add missing signals

* Now a complete signal list on Haiku minus reserved.
* Fixes build failure due to missing SIGUSR1
2017-08-26 01:57:41 +00:00
Alexander von Gluck IV
177d5e6fba haiku: Add missing signals
* Now a complete signal list on Haiku minus reserved.
* Fixes build failure due to missing SIGUSR1
2017-08-25 20:28:03 -05:00
bors
e7ce47a6bb Auto merge of #740 - alexcrichton:more64, r=alexcrichton
Add {,f}stat{,v}fs64 API bindings

Closes https://github.com/rust-lang/libc/issues/738
2017-08-26 01:26:56 +00:00
Alex Crichton
a36da11fb9 Add {,f}stat{,v}fs64 API bindings 2017-08-25 18:26:38 -07:00
Alexander von Gluck IV
c9b276f1ce haiku: Correct typo 2017-08-25 16:13:01 -05:00
bors
2a322c716c Auto merge of #720 - Susurrus:fcntl, r=alexcrichton
Add more fcntl and seal constants for Android/Linux
2017-08-25 00:33:20 +00:00
Bryant Mairs
e397134e35 Add more fcntl constants for android 2017-08-22 08:32:11 -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
bors
13478d0929 Auto merge of #729 - Susurrus:ptrace_request, r=alexcrichton
Fix spelling of ptrace's request argument

Couldn't handle seeing this anymore after working on a ptrace API for `nix`!
2017-08-20 12:34:08 +00:00
Sebastian Humenda
cc5883410e Make more clear why no libraries are linked to L4Re 2017-08-18 11:57:48 +02:00
Sebastian Humenda
dc0a182669 adjust value for minimal thread stack size 2017-08-17 12:58:46 +02:00
Sebastian Humenda
3a1c83cf3c Remove superflouos doc comments 2017-08-17 09:20:03 +02:00
Sebastian Humenda
9b4edb0b83 Merge branch 'master' into test 2017-08-17 09:13:45 +02:00
Bryant Mairs
e41975a2b2 Remove fexecve() from Haiku and MacOS/iOS.
It's not supported on those platforms
2017-08-16 23:18:37 -07:00
Sebastian Humenda
abfd80c50c Improve x86_64/uclibc stat/signal struct definitions
*   correct sigaction
*   correct stat, alias stat64
*   remove doubled statvfs definition
2017-08-16 16:41:06 +02:00
Jose Narvaez
a6a2a5ee88 Changed Redox 'mode_t' constants to Hexadecimal. 2017-08-16 16:41:06 +02:00
Jose Narvaez
203f705e89 Add some permission and misc (mostly 'mode_t' related) constants to Redox. 2017-08-16 16:41:06 +02:00
Bryant Mairs
800dbfde95 Fix spelling of ptrace's request argument 2017-08-13 08:39:49 -07:00
Jan S
c51e91b9b4 OpenBSD kqueue EV_RECEIPT and EV_DISPATCH
OpenBSDs kqueue now has EV_RECEIPT and EV_DISPATCH.

I wrote a patch and the devs merged it into current:
https://marc.info/?l=openbsd-tech&m=149621427511219&w=2

This change extends the rust libc crate to provide the feature.
2017-08-13 13:52:29 +02:00
Jamie Hewland
d5326a10d4 Add getgrouplist() 2017-08-12 22:17:15 +02:00
Jamie Hewland
2d22c18acf Add initgroups to BSD targets 2017-08-12 21:46:31 +02:00
bors
09d920989c Auto merge of #725 - Susurrus:mman_constants, r=alexcrichton
Add MAP_ANONYMOUS to DragonFlyBSD and FreeBSD
2017-08-11 15:30:27 +00:00
bors
56700d5359 Auto merge of #724 - JayH5:more-pgs, r=alexcrichton
pwd/grp: Add reentrant getgr functions and consolidate getpw functions

Commit messages sum it up.
2017-08-11 15:10:21 +00:00
Bryant Mairs
e1d88cb53a Add MAP_ANONYMOUS to DragonFlyBSD and FreeBSD 2017-08-11 08:01:24 -07:00
bors
68463056e5 Auto merge of #722 - Susurrus:mman_constants, r=alexcrichton
Add some more missing pieces

 * some constants for mman
 * `WIFCONTINUED()` for NetBSD & OpenBSD
2017-08-11 06:05:06 +00:00
Bryant Mairs
70975a231a Add MAP_32BIT to 64-bit FreeBSD platforms 2017-08-10 22:18:17 -07:00
Nicolás Caracci
bb504fd519 Add SEEK_DATA and SEEK_HOLE constants to FreeBSD and DragonFlyBSD 2017-08-10 23:55:48 -04:00
Bryant Mairs
558c288125 Add WIFCONTINUED for NetBSD and OpenBSD 2017-08-10 19:21:28 -07:00
Bryant Mairs
748e872a8b Add MADV_*DUMP on Android 2017-08-10 19:21:28 -07:00
Bryant Mairs
c9e6f55f1c Add MADV_FREE and MADV_SOFT_OFFLINE for Android/Linux 2017-08-10 19:21:22 -07:00
Jamie Hewland
48311b0c39 Unix: add getgrnam_r and getgrgid_r 2017-08-10 22:04:25 +02:00
Jamie Hewland
b186b72b75 Move endpwent out of the base Unix module
* Doesn't do much without getpwent/setpwent
* Not supported on Android before Android O
2017-08-10 20:28:27 +02:00
Jamie Hewland
f1d2011401 Try move getpwuid_r/getpwnam_r to base Unix module 2017-08-10 20:01:16 +02:00
Bryant Mairs
75913469d0 Add more socket flags for Android and the BSDs 2017-08-09 21:44:04 -07:00
Sebastian Humenda
85f181c953 Do not link libraries on l4re by default
L4Re builds don't have default libraries. The L4Re build system controls
compilation and passes linker flags using -Z itself.
2017-08-09 14:18:32 +02:00
Sebastian Humenda
e412497d3e Move L4Re-specific code into separate module. 2017-08-08 15:47:43 +02:00
Sebastian Humenda
86cb2a2c2b add more uclibc constants 2017-08-08 12:27:47 +02:00
Jose Narvaez
dcb0f86f7a Changed Redox 'mode_t' constants to Hexadecimal. 2017-08-07 19:25:23 +01:00
Jose Narvaez
246f4be5e9 Add some permission and misc (mostly 'mode_t' related) constants to Redox. 2017-08-07 18:45:50 +01:00
Sebastian Humenda
bd50e599b6 Improve types for uclibc/x86_64
*   fix dirent, dirent64
*   port pthread_attr_t
*   add l4re-specific pthread code
2017-08-07 19:15:21 +02:00
Danek Duvall
1375070196 struct addrinfo needs padding on Solaris/SPARC
64-bit Solaris/SPARC has a 4-byte pad before ai_addrlen for historical
reasons (ai_addrlen used to be defined as a size_t, which is 4 bytes in
ILP32 and 8 in LP64, but was converted to a 4-byte socklen_t in Solaris
10, which necessitated padding for (more or less) binary compatibility).
2017-08-06 20:04:35 -07:00
Marcin Mielniczuk
81eb0947ee Bring back SYS_gettid on Android/ARM which was accidentally removed by #710. 2017-08-04 15:33:55 +02:00
bors
db27ee22ce Auto merge of #702 - berkowski:bsd_poll_flags, r=alexcrichton
A few missing *BSD poll flags

Added a few missing BSD poll flags for completeness.
2017-08-04 03:00:44 +00:00
bors
ecd468e6e9 Auto merge of #710 - marmistrz:android, r=alexcrichton
Port #672 and #686 to Android.

I'd rather avoid the duplication, but this is discussed in #707.
2017-08-04 01:50:04 +00:00
Marcin Mielniczuk
21eb1c5c0b Comment out PTRACE_EVENT_STOP.
It has been added to glibc in version 2.26.
2017-08-03 15:39:31 +02:00
Marcin Mielniczuk
76759d6492 Remove the definitions from submodules 2017-08-03 14:18:10 +02:00
Marcin Mielniczuk
dba08fa3bb Add ptrace constants. 2017-08-03 14:12:41 +02:00
Marcin Mielniczuk
47021028c6 Comment out some of the syscalls for Android.
For some reason, they are in the NDK sources but
they are not available in the tests. I don't know what
Android does here, but nothing that makes sense.
2017-08-03 14:04:54 +02:00
Marcin Mielniczuk
381a4456fb Remove duplicate SYS_gettid 2017-08-02 09:56:38 +02:00
bors
c40b6af24a Auto merge of #709 - wezm:setresuid, r=alexcrichton
Add setresgid & setresuid to FreeBSD and OpenBSD

These functions are both present in [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=setresuid&apropos=0&sektion=0&manpath=FreeBSD+11.1-RELEASE+and+Ports&arch=default&format=html) and [OpenBSD](http://man.openbsd.org/setresuid).
2017-08-02 02:03:39 +00:00
bors
5e6853b9c1 Auto merge of #699 - marmistrz:master, r=alexcrichton
Port #672 and #686 to musl.
2017-08-02 01:03:41 +00:00
Marcin Mielniczuk
20591a37b9 Port #672 and #686 to Android.
I'd rather avoid the duplication, this is discussed in #707.
2017-08-01 14:05:07 +02:00
Wesley Moore
81e4c5bf06 Add setresgid & setresuid to FreeBSD and OpenBSD 2017-08-01 18:55:43 +10:00
Marcin Mielniczuk
0ef465a1a7 Fix double blank line 2017-08-01 10:05:20 +02:00
Marcin Mielniczuk
08fefb7b4e Fix links 2017-08-01 10:00:55 +02:00
Marcin Mielniczuk
a1f0de0449 Remove the offending syscalls.
They have been added in musl 1.16 but updating musl is non-trivial.
2017-08-01 10:00:14 +02:00
Kelvin Ly
db54adac84 Merge branch 'master' of https://github.com/rust-lang/libc 2017-07-31 16:25:21 -04:00
Kelvin Ly
5b55e05b60 Add IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP to uclibc 2017-07-31 16:17:39 -04:00
Michael Neumann
31d55bcee4 Add EVFILT_EXCEPT constant 2017-07-30 16:01:35 +02:00
Zac Berkowitz
1935c1afc0 Fixed style issues. 2017-07-29 18:32:09 +00:00
Zac Berkowitz
c73ef9cdb7 Fixed openbsd POLLNORM flag. 2017-07-29 18:31:44 +00:00
Zac Berkowitz
b452c0641a Added POLLNORM constant to openbsd-like unix 2017-07-29 18:12:57 +00:00
Zac Berkowitz
f37010905d Added POLLSTANDARD and POLLINIGNEOF constants for freebsd-like unix 2017-07-29 17:59:55 +00:00
Nicolas Dusart
2560cda37e add SO_RCVBUFFORCE for s390x 2017-07-27 10:03:45 +02:00
Marcin Mielniczuk
bd9e6f4c09 Fix redefinitions 2017-07-25 17:59:16 +02:00
Marcin Mielniczuk
8a676cbe8b Port #672 and #686 to musl. 2017-07-25 16:31:47 +02:00
bors
f9119d51c3 Auto merge of #697 - wezm:openbsd-so_timestamp, r=alexcrichton
Add missing SO_TIMESTAMP constant for OpenBSD like OSes

Added to mod.rs as both [OpenBSD](e35050970e/sys/sys/socket.h (L97)) and [Bitrig](a15267d824/sys/sys/socket.h (L100)) have it.

Required for https://github.com/nix-rust/nix/pull/688
2017-07-25 14:24:04 +00:00
Nicolas Dusart
ef1cb0763a change type of INADDR constants to in_addr_t 2017-07-25 11:03:38 +02:00
Wesley Moore
a586a85d16 Add SO_TIMESTAMP for OpenBSD like OSes 2017-07-25 17:46:48 +10:00
bors
598469fc8d Auto merge of #695 - ndusart:inaddrany, r=alexcrichton
define INADDR_* constants in unix platforms
2017-07-24 22:24:36 +00:00
Nicolas Dusart
76bf82927f define INADDR_* constants in unix platforms 2017-07-24 23:35:19 +02:00
Danek Duvall
0bc6e03b28 PTHREAD_PROCESS_PRIVATE needs to be a 16-bit type on Solaris 2017-07-24 13:26:50 -07: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
db4273ea2c Add offsets in user_regs_struct from sys/reg.h 2017-07-21 10:13:21 +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
572dc6d914 Auto merge of #683 - ndusart:af_const, r=alexcrichton
Add missing flags to Linux and Android
2017-07-20 15:48:45 +00:00
Nicolas Dusart
a7ba0e8b60 add missing O_* flags 2017-07-20 16:20:47 +02: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
Nicolas Dusart
e22c95d520 Add SO_RCVBUFFORCE in Android 2017-07-20 10:04:15 +02:00
bors
575c65a905 Auto merge of #679 - GuillaumeGomez:other-mac-structs, r=alexcrichton
Add mac structs

With this one, I'll have almost all the structs I need directly in libc. :)
2017-07-19 22:27:51 +00:00
Guillaume Gomez
100f3f29cf Add mac structs 2017-07-19 20:54:24 +02:00
Alex Crichton
f68d9a53b5 Restore SYS_* constants to the c_long type 2017-07-19 07:35:36 -07:00
Gabriel
071a69b5c4 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-19 06:52:12 +02:00
bors
ec1e5ab1ef Auto merge of #672 - marmistrz:master, r=alexcrichton
Add syscall table for x86 and x86_64

I'm wondering if we should use `SYS_write` or `__NR_write`. Both are available to C programs.
2017-07-18 15:47:19 +00:00
Marcin Mielniczuk
c0aaf42b3d Remove existing SYS_* entires
There were previous definitions of SYS_gettid and SYS_perf_event_open
2017-07-18 15:39:28 +02:00
bors
1445dbd405 Auto merge of #675 - asomers:preadv, r=alexcrichton
Enable preadv and pwritev on the BSDs
2017-07-18 13:33:31 +00:00
Marcin Mielniczuk
a4a1687361 Rename __NR_ to SYS_, move before extern fn 2017-07-18 11:33:54 +02:00
Alan Somers
3e5b0748fe Enable preadv and pwritev on the BSDs 2017-07-17 21:40:18 -06:00
Alex Crichton
73873315c2 Merge pull request #674 from ids1024/off_t
Redox: Use c_long instead of usize for off_t
2017-07-17 21:54:07 -05:00
bors
12e22cf5a5 Auto merge of #669 - GuillaumeGomez:mac-consts, r=alexcrichton
Add missing constants for mac

I didn't find these constants on other systems than mac so only mac is updated...
2017-07-17 23:45:11 +00:00
Ian Douglas Scott
9a4bd72c17
Redox: Use c_long instead of usize for off_t 2017-07-17 16:15:54 -07:00
Marcin Mielniczuk
1f81fa018e Add syscall table for x86 and x86_64 2017-07-17 12:59:42 +02:00
Bryant Mairs
fef784e26a Add execvpe for support *nix platforms 2017-07-16 21:53:32 -07:00
Guillaume Gomez
3a2d34779f Add missing constants for mac 2017-07-16 20:40:58 +02:00
bors
8e5152a4ee Auto merge of #667 - GuillaumeGomez:if_msghdr, r=alexcrichton
Add missing if_data and if_msghdr structs
2017-07-16 16:12:20 +00:00
Guillaume Gomez
396bad810b Add missing if_data and if_msghdr structs 2017-07-15 16:21:30 +02:00
Bryant Mairs
79cae41d25 Add more termios s390x constants
These are all that remain for nix to compile on s390x
2017-07-13 18:54:28 -07:00
bors
e7bf0a3d55 Auto merge of #661 - Susurrus:mips_cmspar, r=alexcrichton
Add CMSPAR to linux/mips
2017-07-13 19:37:22 +00: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
463e23e161 merge poll constants in BSD platforms 2017-07-13 15:27:07 +02:00
Nicolas Dusart
67e1c1b24c add poll constants to FreeBSD and DragonFly 2017-07-12 17:55:41 +02:00
Nicolas Dusart
bc79f4fc49 add poll constants to Android 2017-07-12 15:30:36 +02:00
bors
3f903a1da3 Auto merge of #658 - FenrirWolf:newlib-memalign, r=alexcrichton
Add memalign for newlib

Newlib doesn't have `posix_memalign`
2017-07-10 14:52:20 +00:00
bors
472ffbb75f Auto merge of #656 - ndusart:socket-consts, r=alexcrichton
add missing socket constants

Add some missing socket constants that are hardcoded by `nix` (nix-rust/nix#647)

I took the opportunity to merge some constants in a upper module when applicable.
2017-07-10 14:23:25 +00:00
Nicolas Dusart
9f5766fb3f add missing socket constants 2017-07-10 10:52:20 +02:00
Fenrir
5c38f427ec Add memalign for newlib 2017-07-09 22:30:28 -06:00
bors
e5fd61e98e Auto merge of #653 - redox-os:redox, r=alexcrichton
Add read/write to Redox

These functions are required for alloc_system now
2017-07-09 15:38:08 +00:00
Jeremy Soller
7d57f039c4 Update redox.rs 2017-07-09 08:14:52 -06:00
Bryant Mairs
f260fa0d0f Various constants for mips/mips64 and s390x 2017-07-08 20:42:33 -07:00
Jeremy Soller
800d799453 Add read/write to Redox 2017-07-08 17:26:49 -06:00
Alex Crichton
7d74c0993c Clean up CI configuration and add s390x
We can't test s390x because qemu segfaults but we can at least verify that it
compiles.

Closes #650
2017-07-07 14:19:06 -07:00
bors
375d773428 Auto merge of #646 - FenrirWolf:newlib, r=alexcrichton
Add experimental newlib bindings

I'm not sure how much desire there is for something like this in the libc crate, but I've been working with a newlib-based toolchain for a while and thought I'd throw this PR up and see what happens.

These bindings are more specifically targeted towards the devkitARM toolchain from http://devkitpro.org rather than newlib in general. I'd be happy to try making things more platform and toolchain-agnostic, but I'm not completely sure what the best way to do that is. I can move more of the arch-specific bindings to the `arm` folder, but should there also be a `devkitarm` subdirectory to further separate specific bindings from other newlib implementations?

There's also the question of if the bindings should live in the `unix` directory in the first place. Newlib aims to provide a unix/posix-like environment and it would be nice to inherit common unix definitions by default, but it can target anything from embedded devices to custom userlands, and as such it often lacks APIs that are common in other libc variants, such as pthreads.
2017-07-06 19:09:22 +00:00
Fenrir
91f66733ca Add experimental newlib bindings 2017-07-06 12:58:18 -06:00
Bryant Mairs
2008668c12 Add EXTPROC for android 2017-07-05 19:45:20 -07:00
bors
50bc03daa4 Auto merge of #643 - mneumann:fix-dragonfly-pthread-stack-min, r=alexcrichton
DragonFly - Change PTHREAD_STACK_MIN from 1 to 16k

This is probably related to cargo failing on DragonFly when running with
multiple jobs.

The minimum pthread stack size has been increase as shown here [1],
which was needed to fix nodejs.

[1]: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/592912cde1dc358bf080ae9aff3eca491688f47c
2017-07-04 16:10:04 +00:00
bors
44034f0777 Auto merge of #644 - roblabla:feature-missing-SO_PASSCRED-arm, r=alexcrichton
Add missing flags in glibc arm

Adds two missing flags that are defined everywhere except for arm-linux-gnueabi for some reason : SO_PASSCRED and SO_SNDBUFFORCE.

Also adds MAP_32BIT on x86_64-linux-android and i686-linux-android.
2017-07-04 15:50:03 +00:00
roblabla
0ea2040f13 Add missing constant MAP_32BIT on x86_64-linux-android and i686-linux-android 2017-07-04 17:19:32 +02:00
roblabla
ba8ffc8ef7 Add missing flags in glibc arm 2017-07-04 14:33:24 +02:00
Michael Neumann
9fe906c72e DragonFly - Change PTHREAD_STACK_MIN from 1 to 16k
This is probably related to cargo failing on DragonFly when running with
multiple jobs.

The minimum pthread stack size has been increase as shown here [1],
which was needed to fix nodejs.

[1]: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/592912cde1dc358bf080ae9aff3eca491688f47c
2017-07-04 09:36:22 +02:00
bors
ce93306c01 Auto merge of #642 - roblabla:feature-missingConstantsAndroid, r=alexcrichton
Add missing SO_ constants for android

Those constants are used by https://github.com/nix-rust/nix

I pulled them from https://android.googlesource.com/platform/prebuilts/ndk/+/dev/platform/sysroot/usr/include/asm-generic/socket.h
2017-07-03 21:27:17 +00:00
roblabla
4fcd45a96d Add missing SO_ constants for android 2017-07-03 22:35:03 +02:00
bors
3acddc7886 Auto merge of #640 - Susurrus:apple_termios_constants, r=alexcrichton
Add missing termios constants for Mac

Didn't add these the first time around, because it says they're unimplemented, but so are the `NL0` and related constants I added. This also makes testing a little easier having these constants available, and they are in the termios headers on Mac.
2017-07-03 17:32:36 +00:00
bors
ab7885100e Auto merge of #634 - ndusart:master, r=alexcrichton
Update NDK to r15b and add some missing symbols

Use the new unified headers of the NDK and add some missing symbols for Android.

Fixes #632
2017-07-03 16:09:54 +00:00
bors
8ec65a1ae5 Auto merge of #638 - main--:fix, r=alexcrichton
Fix types of PTHREAD_PROCESS_* constants

Somehow these ended up with wrong types in #633.
2017-07-03 15:25:08 +00: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
Bryant Mairs
cab41d7b4a Add missing termios constants for Mac 2017-07-02 18:31:27 -07:00
bors
158d778258 Auto merge of #639 - Susurrus:more_socket_constants, r=alexcrichton
Add socket constants for more platforms

Missing a few constants across all nix-supported platforms (see nix-rust/nix#636) so this adds them. This is still a work in progress as I wanted to make sure I didn't break anything doing most of the fixes. I'll come back and finish this up later.
2017-07-03 01:26:40 +00:00
Bryant Mairs
2a27242272 Add socket constants for more platforms 2017-07-02 16:45:27 -07:00
Bryant Mairs
82dc2f3322 Add constants for termios ioctls 2017-07-02 09:55:00 -07:00
main()
3636d783c7 Fix types of PTHREAD_PROCESS_* constants 2017-07-02 18:47:37 +02:00
Bryant Mairs
e591c6f08a Add tcfgetsid for all unices 2017-06-29 20:49:42 -07:00
Bryant Mairs
17936dc221 Add cfmakesane for FreeBSD
This doesn't appear on any other platforms
2017-06-29 20:49:38 -07:00
main()
b2de1fd5e1 Add pthread_rwlockattr APIs 2017-06-28 17:56:37 +02:00
Alan Somers
8961292919 Add constants for pathconf(3) 2017-06-26 18:38:13 -06:00
Alan Somers
41404970a3 Add sysconf constants for Illumos 2017-06-26 18:37:48 -06:00
Alan Somers
948d36d6c4 sort sysconf constants for Illumos 2017-06-26 18:37:47 -06:00
Alan Somers
db2b3d8e34 Add sysconf(2) constants for NetBSD and OpenBSD 2017-06-26 18:37:47 -06:00
Alan Somers
c0b6280585 Sort sysconf constants for NetBSD and OpenBSD. No functional change. 2017-06-26 18:37:47 -06:00
Alan Somers
7b17a30954 Add sysconf constants for Linux and Android 2017-06-26 18:37:46 -06:00
Alan Somers
57fa5fab85 Add sysconf constants for FreeBSD and DragonflyBSD 2017-06-26 18:37:46 -06:00
Alan Somers
8f666d4273 Sort FreeBSD's sysconf variables. No functional changes. 2017-06-26 18:35:50 -06:00
bors
f53b95a337 Auto merge of #625 - Susurrus:termios_more, r=alexcrichton
Add more termios constants

Went through and found some more termios constants that were missing and added them. I skipped some platforms (solaris, uclibc) and assumed Android has the same constants are Linux, as I couldn't find a good reference for what Android exposes, but it generally follows linux, so I assumed the same was true for some of those values.

## References:
 FreeBSD:
   * d39171bb1f/sys/sys/_termios.h
   * d39171bb1f/include/termios.h
 NetBSD: 0bff031265/sys/sys/termios.h
 musl: /usr/x86_64-linux-musl/include/bits/termios.h (identical to Linux-x86_64)
 linux: /usr/include/bits/termios.h
 OpenBSD: 5271000b44/sys/sys/termios.h
 DragonFlyBSD:
   * ddad68003a/sys/sys/_termios.h
   * ddad68003a/sys/sys/termios.h
 Android: Just use the same as Linux
 uclibc: skipped
 haiku-os: http://cgit.haiku-os.org/haiku/tree/headers/posix/termios.h
 mac: /usr/include/sys/termios.h and /usr/include/sys/_types/_posix_vdisable.h
 solaris: skipped
 bitrig (follows openbsd): d31f5220a9/sys/sys/termios.h
2017-06-26 21:54:59 +00:00
bors
46f71e2b2f Auto merge of #626 - humenda:master, r=alexcrichton
[uclibc] add more structs to x86_64

This adds more structs to the uclibc/x86_64 port.
2017-06-26 20:40:29 +00:00
Bryant Mairs
297d5b7d03 Add termios local flags 2017-06-25 08:39:19 -07:00
bors
a38631f465 Auto merge of #616 - Arvamer:linux_input_types, r=alexcrichton
Add structs defined in linux/input.h

I was using definitions for these structs from `ioctl` but because @cmr decide to deprecate his crate (and yanked all versions :() I think that `libc` is the best place for them.

In original C header, primitive types uses aliases like `__u16` or `__s32`; for now I replaced them with Rust's counterparts but I'm not sure if it is ok, especially because tests were failing for `u64` (`unsigned long long` vs `unsigned long` on x86_64). Also, should I do something special with union in `ff_effect`?

I would like also to add all constants form `linux/input.h` and `linux/input-event-codes.h` if this PR will be accepted.
2017-06-25 04:55:33 +00:00
Gabriel Majeri
93f897aefb Add _SC_NPROCESSORS_CONF 2017-06-24 19:48:17 +03:00
Bryant Mairs
cb53d72581 Add termios control flags 2017-06-24 08:56:16 -07:00