Commit Graph

1161 Commits

Author SHA1 Message Date
Marco A L Barbosa
92ce51823c Make libc-tests compile for aarch64-linux-android
- some tests are failing
- remove readlink, timegm and sig* functions in favor of the
  unix/mod.rs definitions
- remove time64_t (it is not defined for aarch64)
- move some definitions to android/b32.rs and create appropriated
  definitions in android/b64.rs
2017-02-24 16:24:49 -03:00
Marco A L Barbosa
c53251867f Fix i686-linux-android failing tests 2017-02-23 16:40:28 -03:00
Marco A L Barbosa
599eec3781 Add test support for {aarch64, i686}-linux-android 2017-02-23 16:08:29 -03:00
bors
16832447b4 Auto merge of #532 - malbarbo:fs2-android, r=alexcrichton
Add definitions to Android to allow fs2 crate compile

This is the only missing part to allow cargo to compile on android.
2017-02-22 17:41:08 +00:00
bors
64d954c6a7 Auto merge of #533 - raphlinus:master, r=alexcrichton
Make readdir available on all unix targets

The readdir_r call has problems, and we'll probably want to move to
readdir on many, if not most, unix targets. This patch makes readdir
available in unix, rather than just solaris as before.

See https://github.com/rust-lang/rust/issues/40021
2017-02-22 13:59:54 +00:00
Raph Levien
02990f2fd2 Change return type of readdir to *mut ::dirent
Apparently a lot of libc's don't put "const" on the return type for
readdir, which causes type mismatch.
2017-02-21 19:13:16 -08:00
Raph Levien
e010078127 Make readdir available on all unix targets
The readdir_r call has problems, and we'll probably want to move to
readdir on many, if not most, unix targets. This patch makes readdir
available in unix, rather than just solaris as before.

See https://github.com/rust-lang/rust/issues/40021
2017-02-21 15:07:03 -08:00
Marco A L Barbosa
bad80ba4d7 Add definitions to Android to allow fs2 crate compile 2017-02-21 17:17:46 -03:00
bors
0824426826 Auto merge of #531 - freqlabs:master, r=alexcrichton
Add jail functions and constants for FreeBSD

These are the system calls for creating and managing jails on FreeBSD.
2017-02-21 19:40:14 +00:00
Ryan Moeller
7c03711d45 Add jail functions and constants for FreeBSD 2017-02-21 00:41:12 +00:00
bors
3ae5203dd1 Auto merge of #526 - monadbobo:epollexclusive, r=alexcrichton
Add EPOLLEXCLUSIVE that is added in Linux 4.5.

Add [EPOLLEXCLUSIVE](https://kernelnewbies.org/Linux_4.5#head-64f3b13b9026133a232a418a27ac029e21fff2ba) that is added in Linux 4.5.
2017-02-17 15:28:18 +00:00
Simon Liu
d6fbc0d0c2 Add EPOLLEXCLUSIVE that is added in Linux 4.5. 2017-02-17 23:25:19 +08:00
bors
532d80cdc1 Auto merge of #524 - mersinvald:pshared_attrs, r=alexcrichton
Added *_setpshared and *_getpshared bindings

Adding bindings to posix pthreads functions vital for IPC via shared memory.

That's my first PR into libc and I'm not proficient in unix systems programming, so I would really appreciate if someone reviewed it in case I missed something regardrless of the passed tests.
Thanks!
2017-02-17 05:41:18 +00:00
Mike Lubinets
c0c7de7c02 Added *_setpshared and *_getpshared bindings 2017-02-16 15:54:19 +03:00
bors
7a3754f2bb Auto merge of #523 - binarycrusader:master, r=alexcrichton
posix definitions should be used on Solaris

For compatibility reasons, Solaris historically had its header files
setup so that, unless specifically requested through specific header
defines, either the old pre-POSIX interfaces or POSIX.1c Draft 6
interfaces were used. However, in the case of rust, since these symbols
are linked directly instead of via system header files, the underlying
posix symbol name can be used directly instead.

These definitions should be corrected to match what they do on almost
every other platform.

Be aware this is a breaking change in terms of interface for any crates
/ consumers of these interfaces for Solaris.

Fixes #522
2017-02-16 01:53:54 +00:00
Shawn Walker-Salas
6740a8aa0b posix definitions should be used on Solaris
For compatibility reasons, Solaris historically had its header files
setup so that, unless specifically requested through specific header
defines, either the old pre-POSIX interfaces or POSIX.1c Draft 6
interfaces were used. However, in the case of rust, since these symbols
are linked directly instead of via system header files, the underlying
posix symbol name can be used directly instead.

These definitions should be corrected to match what they do on almost
every other platform.

Be aware this is a breaking change in terms of interface for any crates
/ consumers of these interfaces for Solaris.

Fixes #522
2017-02-15 16:19:06 -08:00
bors
53bb038895 Auto merge of #521 - radupopescu:master, r=alexcrichton
WIFCONTINUED function on Linux and FreeBSD

* Adds the missing WIFCONTINUED function to Linux (in `src/unix/notbsd/mod.rs`).
* Modifies the signature of WIFCONTINUED on FreeBSD (`src/unix/bsd/freebsdlike/mod.rs`) to be consistent with the ones on MacOS and Linux.
2017-02-14 15:12:09 +00:00
Radu Popescu
ff8c71aa7e Make WIFCONTINUED signature on FreeBSD consistent with MacOS and Linux 2017-02-13 00:29:06 +01:00
Radu Popescu
ab2fb241f3 Adding WIFCONTINUED function on "notbsd" platform 2017-02-13 00:27:27 +01:00
bors
cfc0165693 Auto merge of #518 - binarycrusader:master, r=alexcrichton
Add missing MSG_PEEK definition for Solaris

Fixes #517
2017-02-10 16:20:31 +00:00
Shawn Walker-Salas
463e9584a9 Add missing MSG_PEEK definition for Solaris.
Fixes #517
2017-02-10 07:17:45 -08:00
Shawn Walker-Salas
c9548a5766 Merge pull request #1 from rust-lang/master
Auto merge of #516 - binarycrusader:master, r=alexcrichton
2017-02-10 07:14:16 -08:00
bors
0056dbe376 Auto merge of #516 - binarycrusader:master, r=alexcrichton
Correct solaris libc definitions:

* pthread_t is defined as uint_t, so must be c_uint, not uintptr_t, just
  as pthread_key_t is already defined
* fd_set is defined as long, so must be i32/i64 based on
  target_pointer_width; this also fixes an indirect endianness issue
  encountered on sparc
* FD_SETSIZE should be defined as 65536 when target_pointer_width = 64

Fixes #515
2017-02-10 02:19:59 +00:00
Shawn Walker-Salas
86b0cab132 * make tidy happy 2017-02-09 10:29:46 -08:00
Shawn Walker-Salas
8304e06b53 Correct solaris libc definitions:
* pthread_t is defined as uint_t, so must be c_uint, not uintptr_t, just
  as pthread_key_t is already defined
* fd_set is defined as long, so must be i32/i64 based on
  target_pointer_width; this also fixes an indirect endianness issue
  encountered on sparc
* FD_SETSIZE should be defined as 65536 when target_pointer_width = 64

Fixes #515
2017-02-08 10:43:11 -08:00
bors
6813109fae Auto merge of #514 - DoumanAsh:missing_af_unspec, r=alexcrichton
Add AF_UNSPEC from Apple socket.h

[socket.h](https://opensource.apple.com/source/xnu/xnu-792.13.8/bsd/sys/socket.h) of Apple contains this definition so i'm not sure why it is missing from libc.
The same goes for other BSD-like OSes...
Is there some particular reasons why it is so?
2017-02-07 17:40:22 +00:00
Douman
45ba8c13cf Add AF_UNSPEC from Apple socket.h 2017-02-07 10:51:42 +03:00
bors
8d8264b967 Auto merge of #512 - dumbbell:support-aarch64-unknown-freebsd, r=alexcrichton
Add types for `aarch64-unknown-freebsd`
2017-02-03 20:29:05 +00:00
bors
b491fb30d5 Auto merge of #510 - Antti:add-wcstombs, r=alexcrichton
Add wcstombs

Add `wcstombs` function to convert from wide chars to multibyte chars.

The `wcstombs(`) function conforms to ISO/IEC 9899:1999 (ISO C99)
2017-02-03 19:36:51 +00:00
bors
5e16e98aac Auto merge of #513 - alexcrichton:fix, r=alexcrichton
Fix the i686-unknown-linux-musl target CI
2017-02-03 19:00:28 +00:00
Alex Crichton
d862a3698c Fix the i686-unknown-linux-musl target 2017-02-03 10:59:40 -08:00
Jean-Sébastien Pédron
1363fe4a03
Add types for aarch64-unknown-freebsd
`aarch64.rs` was copied and adapted from `x86_64.rs`.
2017-02-03 18:10:56 +01:00
Andrii Dmytrenko
c01fd6f48e
Add wcstombs
The wcstombs() function conforms to ISO/IEC 9899:1999 (``ISO C99'')
2017-02-03 12:05:14 +00:00
bors
04d2c7af0c Auto merge of #508 - APTy:ipproto-icmp, r=alexcrichton
Add IPPROTO_ICMP and IPPROTO_ICMPV6 system constants

This adds the protocol value for `ICMP` in both IPv4 and IPv6 variants.

ICMP protocol constant for IPv4 defined as `1` per [RFC 792](https://tools.ietf.org/html/rfc792)
ICMP protocol constant for IPv6 defined as `58` per [RFC 2463](https://tools.ietf.org/html/rfc2463#section-1)

#### Reference
[bsd/apple: netinet/in.h](https://opensource.apple.com/source/xnu/xnu-1699.24.8/bsd/netinet/in.h)
[bsd/freebsdlike/freebsd: netinet/in.h](https://github.com/freebsd/freebsd/blob/master/sys/netinet/in.h#L42)
[bsd/freebsdlike/dragonfly: netinet/in.h](1f249c981c/sys/netinet/in.h (L64))
[bsd/netbsdlike: netinet/in.h](af5d253140/sys/netinet/in.h (L77))
[unix/haiku: netinet/in.h](b65adbdfbc/headers/posix/netinet/in.h (L54))
[unix/notbsd/linux: in.h](8fa3b6f939/include/uapi/linux/in.h (L31)) - [unix/notbsd/linux: in6.h](8fa3b6f939/include/uapi/linux/in6.h (L134))
2017-02-02 02:05:55 +00:00
Tyler Julian
fdb213e415 Add IPPROTO_ICMP and IPPROTO_ICMPV6 system constants 2017-02-01 17:45:39 -08:00
bors
f0898c396c Auto merge of #507 - radupopescu:freebsd_wifcontinued, r=alexcrichton
Adding missing WIFCONTINUED function on FreeBSD systems

This adds the WIFCONTINUED function to any FreeBSD-like system. Addresses #505
2017-02-01 17:02:27 +00:00
Radu Popescu
1b06018c69 Adding missing WIFCONTINUED function on FreeBSD systems 2017-02-01 08:42:24 +01:00
bors
43f1d3f7ed Auto merge of #504 - Idolf:tmpfile, r=alexcrichton
Add O_TMPFILE constant
2017-01-30 20:39:11 +00:00
Mathias Svensson
6207166bc9 Add O_TMPFILE constant 2017-01-29 02:49:09 +01:00
bors
bce927b368 Auto merge of #502 - oconnor663:pipe2_bsd, r=alexcrichton
add pipe2 to non-OSX BSD's

https://github.com/rust-lang/libc/issues/500
2017-01-25 18:45:23 +00:00
Jack O'Connor
7c0673070f add pipe2 to non-OSX BSD's
https://github.com/rust-lang/libc/pull/501
2017-01-25 13:09:22 -05:00
bors
4eb6bf9cc9 Auto merge of #498 - learnopengles:run-ios-tests, r=alexcrichton
Run ios tests

This WIP PR runs the tests on the iOS simulator. I've tested it locally using macOS Sierra and XCode 8.2.1. I get this output:

RUNNING ALL TESTS
PASSED 6756 tests

The python script probably needs to be customized for the specific failure output from this test runner (update: newest commit should have this).
2017-01-18 18:21:23 +00:00
Alex Crichton
d4a5fce471 Touch up the iOS deploy script 2017-01-18 10:20:13 -08:00
Kevin Brothaler
3800c7380c Fixup target triple name 2017-01-17 21:38:37 -04:00
Kevin Brothaler
a40c92aa27 Removed non-mandatory UIRequiredDeviceCapabilities
It’s not clear if these values are used or needed by the simulator. The doc only seems to mention arm values for the actual device:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3
2017-01-17 21:35:27 -04:00
Kevin Brothaler
f8e12769ca Replace Python script with Rust script. 2017-01-17 21:19:30 -04:00
Kevin Brothaler
938955c0f4 Fix i386-apple-ios 2017-01-17 14:47:08 -04:00
Kevin Brothaler
4bcad05d03 osx_image was in the wrong place? 2017-01-17 14:47:08 -04:00
Kevin Brothaler
fdee442356 Pass the tests only if we find an expected positive output (rather than checking for negative output to fail the tests). 2017-01-17 14:47:08 -04:00
Kevin Brothaler
a6f50bb61a Update output check based on all.rs test output 2017-01-17 14:47:08 -04:00