Commit graph

1160 commits

Author SHA1 Message Date
Philipp Keller 437c54c3e1 Remove again as coersion was only introduced late last year 2017-02-22 20:42:45 +01:00
Philipp Keller 828c64c2a4 fix c_void 2017-02-19 13:40:29 +01:00
Philipp Keller 010a8275db Add pthread_exit 2017-02-19 13:30:54 +01:00
Philipp Keller cf3e0676c5 pthread_create expects an unsafe function 2017-02-18 11:02:04 +01:00
Philipp Keller 67f1c5c23f Merge branch 'master' of https://github.com/rust-lang/libc 2017-02-18 10:56:50 +01: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
Philipp Keller 1fbe9520d4 Merge branch 'master' of https://github.com/rust-lang/libc 2017-02-06 06:36:12 +01: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
Kevin Brothaler c8a4d214eb Run the unit tests on the iOS simulator for x86_64-apple-ios 2017-01-17 14:47:08 -04:00
bors 6ec4f81a38 Auto merge of #499 - alexcrichton:bump, r=alexcrichton
Bump to 0.2.20
2017-01-17 16:59:31 +00:00
Alex Crichton d30b4c6fe0 Bump to 0.2.20 2017-01-17 08:58:24 -08:00
bors efeb501c97 Auto merge of #494 - johalun:dragonfly-ttycom, r=alexcrichton
Added some DragonFly-only ttycom.h constants.

I overlooked some DragonFly-only constants in the last PR.
2017-01-17 03:05:55 +00:00