Commit Graph

623 Commits

Author SHA1 Message Date
bors 60f90cf560 Auto merge of #237 - Nercury:use-signal-instead-of-bsd-signal, r=alexcrichton
Use now available link name "signal" instead of "bsd_signal"

On android, the `bsd_signal` is gone, the `signal` is available.

While this is the most obvious solution, I am not sure of a few things:
- How are we going to keep compatibility with older NDKs where `signal` does not exist;
- Was something dependent on this being different on android and thus would break (for example, the rust compiler uses this function, so it may break somewhere).

Fixes #236.
2016-04-06 16:50:11 -07:00
Nerijus Arlauskas 0b7ccdd119 Do not skip "signal" when building libc tests. 2016-04-06 20:56:54 +03:00
bors f4411ad7db Auto merge of #250 - mrhota:readme_update, r=alexcrichton
Remove iOS doc links from README

Fixes #243
2016-04-04 22:28:30 -07:00
bors c2d1c71eef Auto merge of #248 - mrhota:langinfo, r=alexcrichton
langinfo bindings and defs
2016-04-04 21:54:14 -07:00
A.J. Gardner 24c84f1360 Define xlocale and langinfo interfaces
There are many constants defined by langinfo, but we have the
new types, locale_t and nl_item.

We also have several functions, not all of which exist for every
platform:

nl_langinfo
nl_langinfo_l
newlocale
duplocale
freelocale
uselocale
querylocale
2016-04-04 20:51:44 -05:00
bors 7265c17d18 Auto merge of #254 - alexcrichton:rtld-default, r=alexcrichton
Add RTLD_DEFAULT to more platforms
2016-04-04 13:46:14 -07:00
Alex Crichton 031a450aeb Add RTLD_DEFAULT to more platforms 2016-04-04 13:14:54 -07:00
bors 2ded9aeae3 Auto merge of #249 - alexcrichton:fix-link, r=alexcrichton
Link to libraries when disabling `use_std`

This crate currently relies on libraries being linked to come from libstd, but
if `use_std` is disabled that's not true! In that case we need to pull in the
libraries ourselves.

Closes rust-lang/rust#32661
2016-04-04 10:03:27 -07:00
Alex Crichton a28ec43900 Link to libraries when disabling `use_std`
This crate currently relies on libraries being linked to come from libstd, but
if `use_std` is disabled that's not true! In that case we need to pull in the
libraries ourselves.

Closes rust-lang/rust#32661
2016-04-04 10:02:52 -07:00
bors fb2f0bbdab Auto merge of #253 - nodakai:strerror_r, r=alexcrichton
On non-musl Linux, strerror_r should be linked to __xpg_strerror_r

Currently `libc::strerror_r()` wrongly returns a `c_char` pointer as a large `c_int`.

Also exclude `MS_RMT_MASK` from `libc-test`.
2016-04-03 14:48:34 -07:00
bors 46cca7a06e Auto merge of #252 - mneumann:freebsd_dragonfly_pthread, r=alexcrichton
Add several pthread functions for DragonFly/FreeBSD

These are needed in order to fix/implement the guard page code of Rust
for DragonFly.
2016-04-03 11:54:31 -07:00
bors 331d70519e Auto merge of #247 - nodakai:clock_getres, r=alexcrichton
Add clock_getres(3) and improve clockid_t constants.

This is still a draft
2016-04-03 09:02:16 -07:00
NODA, Kai 4d1efd9e8a
Exclude MS_RMT_MASK from libc-test
It was updated recently, so the test is known to fail depending on the
libc version of the test environment.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-04-03 22:16:52 +08:00
NODA, Kai 75a69bf8e2
On non-musl Linux, strerror_r should be linked to __xpg_strerror_r
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-04-03 22:16:43 +08:00
Michael Neumann 9940be6937 Add several pthread functions for DragonFly/FreeBSD
These are needed in order to fix/implement the guard page code of Rust
for DragonFly.
2016-04-03 12:28:23 +02:00
NODA, Kai 7e752a3b80
Add clock_getres(3) and more clockid_t constants.
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-04-03 14:07:39 +08:00
A.J. Gardner e335c50b13 Remove iOS doc links from README 2016-04-02 18:41:19 -05:00
bors f288e185f4 Auto merge of #246 - kamalmarhubi:openpty, r=alexcrichton
unix: Add openpty(3) and forkpty(3) for non-Apple platforms

The functions were added for Apple in #202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
  https://github.com/rust-lang/rfcs/pull/1529
2016-04-02 16:30:23 -07:00
Kamal Marhubi 9c4af10e88 unix: Add openpty(3) and forkpty(3) for non-Apple platforms
The functions were added for Apple in #202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
  https://github.com/rust-lang/rfcs/pull/1529
2016-04-02 09:33:55 -04:00
bors dfc1ab5f2b Auto merge of #244 - mrhota:basic_locale, r=alexcrichton
Add lconv type, and locale support for UNIX

We have lconv struct, setlocale(), and localeconv(). Constants live
under notbsd for now.
2016-03-31 10:15:53 -07:00
A.J. Gardner 5399c89f60 Change netbsd link_name for setlocale 2016-03-30 23:09:25 -05:00
A.J. Gardner 5a0c067f1b Define struct and consts for notbsds
Linux-likes have more locale categories than the BSDs (except for
musl). We define the common set of categories at the
src/unix/notbsd/mod.rs level, and leave the rest to the
platform-specific modules.
2016-03-30 22:51:47 -05:00
A.J. Gardner 0dc717626e Define struct and consts for bsds
The BSDs seem to have more peculiarities than the notbsds
2016-03-30 22:50:10 -05:00
A.J. Gardner 874852cff1 Pull lconv def down into notbsd 2016-03-30 19:59:47 -05:00
A.J. Gardner 912a7a03b4 Fix lconv field offsets for apple-likes 2016-03-30 19:49:42 -05:00
bors 62fb1d52b5 Auto merge of #245 - alexcrichton:bump, r=alexcrichton
Bump to 0.2.9
2016-03-30 17:40:49 -07:00
Alex Crichton 3de1107244 Bump to 0.2.9 2016-03-30 17:40:32 -07:00
bors 334b106303 Auto merge of #241 - alexcrichton:fix-header-footer, r=alexcrichton
Swap header/footer... dunno how they got that way?

Apparently they were swapped accidentally already!

Closes #240
2016-03-30 09:07:10 -07:00
A.J. Gardner b788a5c736 Add locale.h in libc-test 2016-03-30 01:13:55 -05:00
A.J. Gardner 2bd6f12241 Fix long line
Lint caught a long line. This should fix the CI failure.
2016-03-30 00:55:49 -05:00
A.J. Gardner 110152c115 Add lconv type, and locale support for UNIX
We have lconv struct, setlocale(), and localeconv(). Constants live
under notbsd for now.
2016-03-30 00:36:43 -05:00
Alex Crichton 19e64f3cfb Swap header/footer... dunno how they got that way?
Apparently they were swapped accidentally already!

Closes #240
2016-03-28 13:58:13 -07:00
Nerijus Arlauskas b2eec2470c Use now available link name "signal" instead of "bsd_signal".
Fixes #236.
2016-03-19 20:31:41 +02:00
bors cd925e0ce1 Auto merge of #233 - kamalmarhubi:linux-fcntl, r=alexcrichton
linux: Add missing Linux-specific fcntls

Also move F_DUPFD_CLOEXEC up a level as it is available on Android.
2016-03-18 09:38:23 -07:00
Kamal Marhubi b43118cb98 linux: Add missing Linux-specific fcntls
Also move F_DUPFD_CLOEXEC up a level as it is available on Android.

This commit leaves file sealing related fcntls and bitflag constants
out, as they are defined in `linux/fcntl.h` rather than `fcntl.h`. They
can be included once an approach for verification has been figured out.
See #235 for more detail.
2016-03-18 01:43:59 -04:00
bors fa161aec16 Auto merge of #229 - kamalmarhubi:mount-flags, r=alexcrichton
linux: Move some MS_flags for mount(2) up

These flags are available on Android.
2016-03-15 00:12:31 -07:00
bors aabff317d4 Auto merge of #226 - m4rw3r:master, r=alexcrichton
apple: Add TIOC* constants

From `sys/ioctl.h`.

Extracted on OS X 10.11.3.
2016-03-14 22:57:24 -07:00
bors 052118790c Auto merge of #230 - alexcrichton:winapi-update, r=alexcrichton
Update winapi
2016-03-14 21:59:54 -07:00
Alex Crichton 609693dae1 Update winapi 2016-03-14 21:59:21 -07:00
Kamal Marhubi 10bfe07651 linux: Move some MS_ flags for mount(2) up
These flags are available on Android.
2016-03-14 19:25:06 -04:00
Kamal Marhubi 4ff4acec36 linux: Comment distinction between msync and mount MS_ flags
They have different types and should be visually separated for ease of
reading.
2016-03-14 19:25:06 -04:00
bors 722fedd5bb Auto merge of #227 - kamalmarhubi:clone-flags, r=alexcrichton
linux: Move namespace clone flags up one level

The flags are available in Android, and should be defined higher up.
2016-03-13 13:39:33 -07:00
Kamal Marhubi ae69a167ac linux: Move namespace clone flags up one level
The flags are available in Android, and should be defined higher up.
2016-03-13 16:26:49 -04:00
Martin Wernstål f500051a99 apple: TIOCTIMESTAMP and TIOCDCDTIMESTAMP differ on 32 bit 2016-03-13 20:35:56 +01:00
Martin Wernstål 8e85797c3d apple: Add TIOC* constants
From sys/ioctl.h
2016-03-13 16:41:06 +01:00
bors d9f256ec37 Auto merge of #225 - posborne:netlink-android, r=alexcrichton
Pull sockaddr_nl up a layer as it is present for Android

The addition of sockaddr_nl seems to be a fairly recent
addition to bionic, although it would appear that its lack
of presence in previous versions is more of an oversight than
anything else.

831c8a5249/libc/kernel/uapi/linux/netlink.h (L54)
2016-03-11 22:43:11 -08:00
Paul Osborne 9e94d5b777 Pull sockaddr_nl up a layer as it is present for Android
The addition of sockaddr_nl seems to be a fairly recent
addition to bionic, although it would appear that its lack
of presence in previous versions is more of an oversight than
anything else.

831c8a5249/libc/kernel/uapi/linux/netlink.h (L54)

This change is motivated by failures to build nix under Android.

Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-12 00:13:31 -06:00
bors 493d79b2ea Auto merge of #224 - kamalmarhubi:safer-cfg, r=alexcrichton
Make cfg_if uses more explicit and consistent

This commit changes most uses of cfg_if as follows:
- fallthrough `else` usage is avoided for architecture or OS specific
  items
- a comment is added in the final `else` clause to signal intent someone
  modifying

It is safer to omit items than include ones for the wrong platform or
architecture.
2016-03-11 12:31:39 -08:00
Kamal Marhubi 66c3375326 Make cfg_if uses more explicit and consistent
This commit changes most uses of cfg_if as follows:
- fallthrough `else` usage is avoided for architecture or OS specific
  items
- a comment is added in the final `else` clause to signal intent someone
  modifying

It is safer to omit items than include ones for the wrong platform or
architecture.
2016-03-11 14:06:21 -05:00
bors ef979ef4d8 Auto merge of #222 - mneumann:dragonfly_clock_gettime, r=alexcrichton
Fix DragonFly: clock_gettime() expects CLOCK_* constants as ulong.

While there add all CLOCK_ constants as found on DragonFly.
2016-03-11 11:00:34 -08:00