Commit graph

2405 commits

Author SHA1 Message Date
dependabot[bot] 011603aacf
Bump ctest from 482c7f0 to 5c53723
Bumps [ctest](https://github.com/alexcrichton/ctest) from `482c7f0` to `5c53723`.
- [Release notes](https://github.com/alexcrichton/ctest/releases)
- [Commits](482c7f0643...5c537236d1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-06 20:11:01 +00:00
bors 22e4dcff18 Auto merge of #1033 - SmilingNavern:add_packet_mreq, r=alexcrichton
Add if_packet.h headers

Some structs for implementing af_packet(7)
2018-07-06 15:55:00 +00:00
Alexander Danilov 5446faa3c5 Fix type + style fix style issues 2018-07-06 18:40:46 +03:00
Alexander Danilov 6a5dd502f0 Add if_packet.h headers
Some structs for implementing af_packet(7)
2018-07-06 17:41:26 +03:00
debris 41475bdedf Fixed lint errors 2018-07-05 19:04:02 +02:00
debris ba46c0cbff Add exchangedata for bsd 2018-07-05 18:23:23 +02:00
bors 460fb1310a Auto merge of #1031 - dusxmt:add-platform-linux-musl-ppc32, r=alexcrichton
Add linux musl powerpc (32-bit) support

This change adds support for musl on 32-bit powerpc.  Most of the general constants in src/unix/notbsd/linux/musl/b32/mod.rs were different from those of the powerpc port, so I moved them over to the individual architecture-specific submodules.  The same with the ipc_perm structure.
2018-07-05 15:15:18 +00:00
Marek Benc 0163a7ce20 Add linux musl powerpc (32-bit) support 2018-07-05 15:57:31 +02:00
bors 4dd66657b7 Auto merge of #1030 - mati865:android_enoattr, r=alexcrichton
Add ENOATTR for Android

PR based on https://github.com/rust-lang/libc/pull/594

It's defined in Android sysroot so it should work without test workaround (CI should catch it otherwise?).
2018-07-05 02:29:10 +00:00
Mateusz Mikuła 27043ec8df Add ENOATTR for Android 2018-07-04 20:35:31 +02:00
bors 8a9b980a84 Auto merge of #1029 - alexcrichton:no-custom-attr, r=alexcrichton
Remove `#![custom_attribute]`

No longer needed by the looks of it!
2018-07-03 23:31:04 +00:00
Alex Crichton cd3b87dc7e Remove #![custom_attribute]
No longer needed by the looks of it!
2018-07-03 16:30:13 -07:00
bors 03e1a8cde9 Auto merge of #1027 - bcko:patch-1, r=alexcrichton
added badges

added Documentation, Latest Version, License badges similar to rand crate. https://crates.io/crates/rand
2018-07-01 18:14:20 +00:00
bors b6d23ed45d Auto merge of #1028 - est31:master, r=alexcrichton
Re-add aarch64 stuff removed by previous PR

Previous PR #1023 has removed stuff from mod.rs and added it to some submodules, but
missed the aarch64 submodule.

This caused a build failure for rust on aarch64, see https://github.com/rust-lang/rust/pull/51864.

This copies the stuff that that commit added to the x86_64.rs submodule
and puts it into aarch64.rs.

It's been tested in the rust-lang/rust PR above: https://travis-ci.org/rust-lang/rust/builds/398750336
2018-07-01 16:58:37 +00:00
est31 90c01fa6b0 Re-add aarch64 stuff removed by previous commit
Previous commit

dcff154781
"libc: changes to ppc64le musl branch to support building of rust on Alpine"

has removed stuff from mod.rs and added it to some submodules, but
missed the aarch64 submodule.

This copies the stuff that that commit added to the x86_64.rs submodule
and puts it into aarch64.rs.
2018-07-01 09:25:11 +02:00
BC Ko 8a120921bf
added badges
added Documentation, Latest Version, License badges similar to rand crate. https://crates.io/crates/rand
2018-06-30 21:48:41 -07:00
bors a9666f6010 Auto merge of #1026 - papertigers:master, r=alexcrichton
illumos header translation is wrong 02000000 should be 0x80000

I am recently getting into rust and discovered that tokio wasn't working on illumos.  I traced it back to mio but ultimately the issue ended up being this value in the libc crate.  It looks like the octal value isn't properly translated to the rust crate as hex.  Here's a test program I was using on linux and illumos:

```rust
extern crate libc;

#[allow(dead_code)]
const ILLUMOS_EPOLL_CLOEXEC: i32 = 0x80000;

fn find_func() -> usize {
    unsafe { libc::dlsym(libc::RTLD_DEFAULT, "epoll_create1\0".as_ptr() as *const _) as usize }
}

fn main() {
    let addr = find_func();

    #[allow(unused_variables)]
    let hex = format!("{:x}", addr);

    // I think the position changes per run on linux due to something like ASLR
    // so we only test on solaris for this use case
    #[cfg(target_os = "solaris")]
    assert_eq!(hex, "ffffbf7fff226fe0"); // confirmed with addrtosymstr

    unsafe {
        let f = std::mem::transmute::<usize, fn(i32) -> i32>(addr);

        #[cfg(target_os = "linux")]
        let epfd = f(libc::EPOLL_CLOEXEC);

        #[cfg(target_os = "solaris")]
        let epfd = f(ILLUMOS_EPOLL_CLOEXEC);

        println!("call to epoll_create1 returned: {}", epfd);
    }
}
```

Which outputs the following:

```
# cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/dlsym`
call to epoll_create1 returned: 3
```

Edit: typo
2018-06-30 23:47:54 +00:00
Mike Zeller 2341e6f3ad illumos header translation is wrong 02000000 should be 0x80000 2018-06-30 18:38:44 -04:00
bors 7cac8d0c9d Auto merge of #1019 - est31:master, r=alexcrichton
Simplify the stdbuild section

Found this when encountering the code in the rustc submodule and changing the allow for the warnings to deny.

* `no_std` is stable so it does not have to be listed in the `feature` attribute
* `no_std` as an attribute for the crate is already implied by the `#![cfg_attr(not(feature = "use_std"), no_std)]` below
* `staged_api` as an attribute gives a warning. That also matches my knowledge.
2018-06-28 04:03:20 +00:00
bors 0d0a5f7510 Auto merge of #1024 - nielx:master, r=alexcrichton
Haiku: Add more IP_* and IPV6_* constants.

These are used in the socket2 library.
2018-06-28 03:31:12 +00:00
bors ac1a1193fb Auto merge of #1022 - sfackler:phys-pages, r=alexcrichton
Add _SC_PHYS_PAGES on macOS
2018-06-28 02:58:09 +00:00
bors 42a5ad8cd9 Auto merge of #1023 - mksully22:ppc64le_libc, r=alexcrichton
libc: changes to ppc64le musl branch to support building of rust on A…

…lpine

This PR includes changes to the libc musl branch to include the correct defines & declarations to support powerpc64.  Values that needed changes to a definition for powerpc64.rs that existed higher in the branch also resulted in a change that moved the definition down to the b32/mod.rs, b64/x86_64.rs to ensure that builds continued to work on those architectures.

Verification was done building rust for both ppc64le and x86_64 on Alpine as described in the git project
https://github.com/mksully22/ppc64le_alpine_rust_1.26.2
2018-06-28 02:21:06 +00:00
bors f36341e219 Auto merge of #1021 - redox-os:master, r=alexcrichton
Add getpid on Redox

None
2018-06-28 01:08:08 +00:00
bors 93bc59e637 Auto merge of #1018 - scottlamb:pr-fdopendir, r=alexcrichton
add fdopendir on macOS

Fixes #1017

I moved it up to src/unix/mod.rs, as it's specified in POSIX.1-2008 and
appears to be implemented on every Unix-like system.

The symbol names on macOS appear similar to those for opendir; I found
them via the commands below. I tested the x86_64 version;
fdopendir$INODE64 worked as expected.

$ nm -arch x86_64 /usr/lib/system/libsystem_c.dylib | grep fdopendir
000000000007ea6d T _fdopendir
000000000002ba97 T _fdopendir$INODE64
$ nm -arch i386 /usr/lib/system/libsystem_c.dylib | grep fdopendir
00082d1e T _fdopendir
0002b528 T _fdopendir$INODE64$UNIX2003
00082d1e T _fdopendir$UNIX2003
2018-06-28 00:14:38 +00:00
bors 23578141f2 Auto merge of #1016 - debris:fs-swap-api, r=alexcrichton
added renamex_np, renameatx_np

these function can be used to atomically swap files

- added 2 macos specific functions - `renamex_np` and `renameatx_np` and two constants `RENAME_SWAP` and `RENAME_EXCL`
  - [macos stdio.h](https://github.com/apple/darwin-xnu/blob/0ddccd8/bsd/sys/stdio.h#L45-L48)
  - [docs](http://www.manpagez.com/man/2/renameatx_np/osx-10.12.3.php)
- ~added linux specific `renameat2`. according to the [docs](http://man7.org/linux/man-pages/man2/rename.2.html#VERSIONS) it was added to Linux in kernel 3.15.~
2018-06-27 23:08:59 +00:00
bors 4bd52f5e3e Auto merge of #995 - canndrew:if_arp, r=alexcrichton
add net/if_arp.h definitions

This is based on the contents of include/net/if_arp.h on my Linux system.
2018-06-27 21:58:05 +00:00
Niels Sascha Reedijk 572f142459 Haiku: Add more IP_* and IPV6_* constants.
These are used in the socket2 library.
2018-06-20 06:47:38 +00:00
Mike Sullivan dcff154781 libc: changes to ppc64le musl branch to support building of rust on Alpine
amend to add style changes
amend to add style changes
2018-06-18 18:53:59 +00:00
Steven Fackler 4aabb87661 Add _SC_PHYS_PAGES on macOS 2018-06-15 11:48:57 -07:00
jD91mZM2 30f6da8a64
Add getpid 2018-06-09 07:54:56 +02:00
est31 f164aa8806 Simplify the stdbuild section 2018-06-08 09:24:30 +02:00
Scott Lamb 322ba046d8 add fdopendir on macOS
Fixes #1017

I moved it up to src/unix/mod.rs, as it's specified in POSIX.1-2008 and
appears to be implemented on every Unix-like system.

The symbol names on macOS appear similar to those for opendir; I found
them via the commands below. I tested the x86_64 version;
fdopendir$INODE64 worked as expected.

$ nm -arch x86_64 /usr/lib/system/libsystem_c.dylib | grep fdopendir
000000000007ea6d T _fdopendir
000000000002ba97 T _fdopendir$INODE64
$ nm -arch i386 /usr/lib/system/libsystem_c.dylib | grep fdopendir
00082d1e T _fdopendir
0002b528 T _fdopendir$INODE64$UNIX2003
00082d1e T _fdopendir$UNIX2003
2018-06-07 21:49:10 -07:00
debris 843388ac7d glibc does not provide a wrapper for the renameat2 2018-06-04 16:37:03 +02:00
debris 7315cfda35 added renameat2, renamex_np, renameatx_np 2018-06-04 15:51:32 +02:00
Andrew Cann 1cc2f1e9b2 add net/if_arp.h definitions 2018-06-04 11:06:57 +08:00
bors 8a85d662b9 Auto merge of #1014 - Susurrus:termios_sparc64, r=alexcrichton
Add some termios constants for sparc64
2018-06-01 22:29:29 +00:00
Bryant Mairs 2aa329751a Add some termios constants for sparc64 2018-06-01 15:24:37 -07:00
bors 575832db87 Auto merge of #1012 - redox-os:master, r=alexcrichton
Bump version to 0.2.42

Closes https://github.com/rust-lang/libc/issues/1011
2018-06-01 20:32:35 +00:00
bors a75938db01 Auto merge of #1010 - canndrew:make-size_of-const, r=alexcrichton
make dox::mem::size_of a const fn
2018-06-01 19:57:12 +00:00
bors 1fc4c57828 Auto merge of #1007 - canndrew:dox-traits, r=alexcrichton
add more built-in traits to dox.rs

Add/fix bitwise operation traits in dox.rs
2018-06-01 19:16:33 +00:00
bors c0817817ca Auto merge of #1005 - Susurrus:s390x_fix, r=alexcrichton
Fix sparc64 builds

Partially fixes #987.
2018-06-01 18:37:36 +00:00
bors 3783f1fbf4 Auto merge of #1001 - canndrew:add-rtentry, r=alexcrichton
add rtentry
2018-06-01 18:14:56 +00:00
Jeremy Soller a27fae96a0 Bump version to 0.2.42 2018-06-01 08:14:12 -06:00
bors 6acb091b5e Auto merge of #1008 - stratact:master, r=alexcrichton
Add `gethostname` support to Redox module

We need this for hostname support in Ion shell.
2018-06-01 13:53:40 +00:00
Andrew Cann 0198ea0d76 add const_fn feature 2018-06-01 17:31:11 +08:00
Andrew Cann c460b376c2 make dox::mem::size_of a const fn 2018-06-01 16:58:47 +08:00
stratact d650166116 Add gethostname support to Redox module 2018-06-01 01:01:20 -07:00
Andrew Cann 399c37d19d remove lone symbol 2018-06-01 15:39:37 +08:00
Andrew Cann 78dbddb4f1 move rtentry even further down heirarchy 2018-06-01 15:39:04 +08:00
Andrew Cann 29d944b71a move stuff into linux subdir 2018-06-01 15:37:57 +08:00