Commit Graph

1159 Commits

Author SHA1 Message Date
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
Bryant Mairs
bd7dfd133b Add termios control character indices 2017-06-24 08:56:16 -07:00
Bryant Mairs
14a3a11e24 Add more termios output flags 2017-06-24 08:56:14 -07:00
Sebastian Humenda
c7a7cd831c Add more structs
This adds more structs to the uclibc/x86_64 port.
2017-06-23 14:28:38 +02:00
equal-l2
00fae9ebe5 Explicitly use namespace 2017-06-20 09:46:45 +09:00
equal-l2
6294184355 Add O_TTY_INIT for FreeBSD 2017-06-19 23:46:37 +09:00
equal-l2
8394276be0 Add O_RSYNC for NetBSD and OpenBSD 2017-06-19 23:46:37 +09:00
equal-l2
cad9a69cf7 Add O_EXEC for FreeBSD 2017-06-19 23:46:37 +09:00
equal-l2
971a291414 Add O_DIRECT for NetBSD and FreeBSD-like 2017-06-19 23:46:37 +09:00
equal-l2
62c0993210 Add O_DIRECTORY for FreeBSD, DragonFly, and OpenBSD-like 2017-06-19 23:44:08 +09:00
equal-l2
1c39531673 Unify some BSD flags 2017-06-19 09:56:32 +09:00
Michael Neumann
abdeff3829 Fix AT_ constants for DragonFly 2017-06-16 15:05:04 +02:00
Kornel
53e0d387f8 struct tm for Windows
https://msdn.microsoft.com/en-us/library/windows/hardware/ff567981(v=vs.85).aspx

Matches corecrt_wtime.h from Win10 SDK
2017-06-15 23:16:50 +01:00
Arvamer
495d22a28d Merge branch 'master' into linux_input_types 2017-06-15 21:07:32 +02:00
bors
edbc1f14e7 Auto merge of #619 - gdf8gdn8:fixed-missing-epolloneshot-android, r=alexcrichton
Fixed missing EPOLLONESHOT for android

resolve #548
2017-06-15 14:29:34 +00:00
bors
ce955e98c3 Auto merge of #618 - jcowgill:mips-cleanups, r=alexcrichton
Various MIPS cleanups

This PR contains a few cleanups to the MIPS part of the bindings. It mostly moves stuff out of `mips/mips32.rs` into `mips/mod.rs` which is identical between mips32 and mips64, mostly because mips64 is missing a number of syscalls. In addition, I add `struct flock` which was missing on mips64.
2017-06-15 13:56:10 +00:00
James Cowgill
3799b7b29e Add missing struct flock to mips64 2017-06-15 11:01:20 +01:00
James Cowgill
23ce69b05a Add missing MIPS syscalls
In addition, move the syscalls to the mips module file because they are
all identical in mips32 and mips64.
2017-06-15 11:01:19 +01:00
James Cowgill
b58bf3db62 Move types common to mips32 and mips64 into the main mips module
As a result of this commit, glob64_t will be added to mips64.
2017-06-15 11:00:47 +01:00
Uwe Strempel
519c5ea963 Fixed missing epoll one shot 2017-06-15 10:33:45 +02:00
Arvamer
92fac1dc92 Merge branch 'master' into linux_input_types 2017-06-15 09:12:34 +02:00
Mateusz Sieczko
60d93226ff Add structs defined in linux/input.h 2017-06-14 21:48:41 +02:00
Jörg Thalheim
2c8ad9b0c3
Add dirfd on netbsd 2017-06-14 07:52:56 +01:00
bors
c25d657029 Auto merge of #611 - vityafx:add-pthread-priority-functions, r=alexcrichton
Add schedule params & priority pthread functions

Fixes #609. Provides bindings to `pthread_getschedparam`, `pthread_setschedparam` and `pthread_setschedprio` functions.

P.S. My first PR in such a project.
P.P.S. `libc-test` crashed at building stage with a lot of errors, so I hope `travis` will do a check.
P.P.P.S. These functions are tested to work on Linux (Ubuntu 14.04) with my own crate. I will release it next week, it provides ability to control thread schedule policies and priorities.
2017-06-13 15:19:36 +00:00
bors
539e50c4a9 Auto merge of #571 - Mic92:dirfd, r=alexcrichton
add dirfd on unix
2017-06-13 14:04:16 +00:00
Victor Polevoy
fbec8eb48c Move pthread_setschedprio into the linux submodule 2017-06-13 14:49:19 +03:00
Victor Polevoy
a75fef0b89 Disable pthread_setschedprio for android 2017-06-13 13:56:31 +03:00
Victor Polevoy
192a245a47 Move pthread_setschedprio to not-bsd 2017-06-13 13:54:52 +03:00
Victor Polevoy
84c20a1c9b Build fix for non-bsd 2017-06-13 11:17:18 +03:00
Jörg Thalheim
59008790e1
add dirfd on unix 2017-06-13 08:02:31 +01:00
Shawn Anastasio
4340d17e3f Add unix seteuid()
Adds prototype for unix seteuid() as defined here: http://pubs.opengroup.org/onlinepubs/009695399/functions/seteuid.html
2017-06-09 23:52:30 -05:00
Victor Polevoy
cb03e6236c Add schedule params & priority pthread functions 2017-06-09 18:21:26 +03: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
4e0e06e370 move some functions not in android 2017-06-07 20:19:42 -07: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
Sebastian Humenda
4d3ea348b0 Add x86_64 module to uclibc/mod.rs 2017-06-04 10:14:54 +02:00
Sebastian Humenda
09a04d8e71 Add experimental L4re support
This commit introduces a UNIX-alike target for the l4re microkernel
operating system. While this system is not a UNIX system at all, it is
easiest to use the POSIX interface and hence benefit from common
definitions.

This version is a very early draft, only the basic data types have been
verified and most of the complex data types (structs and unions) have
not been ported yet.
2017-06-01 16:37:08 +02: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
Hiroki Noda
b83505c8ea Add _SC_NPROCESSORS_CONF on Linux 2017-05-29 08:47:04 +09:00