Commit Graph

411 Commits

Author SHA1 Message Date
Pascal Bach ebe0feb55d Add linux/module.h to test build 2018-07-17 18:41:48 +02:00
bors 5ac35c85fe Auto merge of #1039 - alesharik:master, r=alexcrichton
Implement statfs for dragonfly, freebsd and openbsd
2018-07-17 13:47:45 +00:00
alesharik 5ec8699bcb Implement statfs for dragonfly, freebsd and openbsd 2018-07-17 00:17:55 +03:00
Sébastien Marie fec9baf0a3 remove ignore for published OpenBSD versions 2018-07-14 06:58:37 +02:00
Mateusz Mikuła 27043ec8df Add ENOATTR for Android 2018-07-04 20:35:31 +02:00
Andrew Cann 1cc2f1e9b2 add net/if_arp.h definitions 2018-06-04 11:06:57 +08:00
Andrew Cann 651d6feafe add rtentry 2018-06-01 13:10:15 +08:00
Andrew Cann b02c6a328d Remove ioctl symbols for emscripten 2018-05-30 18:08:28 +08:00
Andrew Cann 93f9167bea Add linux socket ioctl defs 2018-05-30 17:27:18 +08:00
Bastian Köcher 6a6dc86fb2 Fixes test for android `getifaddrs` 2018-05-26 10:48:02 +02:00
Andrew Morrow 96ee7bf81c Add new sendfile flags for FreeBSD 2018-05-17 08:54:53 -06:00
Jake McGinty 0e3cf4737b add pktinfo consts and structs for linux and apple 2018-04-22 21:24:33 -07:00
gnzlbg dfee17f1ff fix this for stdbuild only 2018-04-15 14:50:00 +02:00
gnzlbg dc1956e2ef fix undefined behavior due to incorrect packing on macosx 2018-04-15 14:45:26 +02:00
Sébastien Marie 16527634cc Add MAP_STACK constant to OpenBSD
The mmap(2) flag indicate that the mapping is used as a stack.

https://man.openbsd.org/mmap.2#MAP_STACK
https://marc.info/?l=openbsd-tech&m=152035796722258&w=2
2018-03-19 08:39:35 +01:00
Wesley Moore be2f062767 Fix test suite on FreeBSD 11 2018-03-12 11:03:46 +11:00
Fredrick Brennan 6d959f1a53 Fix BSD errors (hopefully) 2018-03-04 13:11:04 +00:00
bors 8bed48a751 Auto merge of #931 - bdrewery:posix_spawn_freebsd, r=alexcrichton
Add posix_spawn bindings for FreeBSD
2018-02-28 17:30:10 +00:00
gnzlbg f9c396803c perform ctest with and without std 2018-02-27 17:36:45 +01:00
Bryan Drewery 92d50c9c79 Add posix_spawn bindings for FreeBSD 2018-02-26 16:45:41 -08:00
Linus Färnstrand 750fcf5c5a Add missing netfilter constants
Was able to move some of them up one level so they are valid on more
platforms with less duplication
2018-02-25 22:45:43 +01:00
Linus Färnstrand 69ae346034 Add genetlink.h constants 2018-02-22 14:58:22 +01:00
luozijun 0f4ae0b8f1 Add constants IFF_TUN, IFF_TAP and IFF_NO_PI on linux, android and fuchsia system 2018-02-07 11:12:29 +08:00
gnzlbg 53e4733180 add macosx sysv ipc shared memory 2018-02-03 14:43:38 +01:00
bors 782794985c Auto merge of #902 - gnzlbg:missing_linux_intrinsics, r=malbarbo
Missing linux intrinsics
2018-02-01 15:41:35 +00:00
Linus Färnstrand 4d5ed47efd Add netfilter constants to Linux and Android 2018-01-30 23:08:00 +01:00
bors 11cabded2b Auto merge of #909 - alexcrichton:posix-spawn, r=alexcrichton
Add posix_spawn bindings
2018-01-26 01:34:54 +00:00
Alex Crichton 4621a34864 Add posix_spawn bindings 2018-01-25 17:12:24 -08:00
Greg V c13302d87e Add rtprio (realtime priority) API for FreeBSD and DragonFly 2018-01-23 13:13:48 +03:00
Greg V 2aeb382bb8 Ignore new FreeBSD constants in tests
CI still runs version 10
2018-01-22 18:15:36 +03:00
Greg V 6725fd6aef Add FreeBSD process descriptors API
Available since FreeBSD 9.0, this API allows using local descriptors
instead of global PIDs. It works in Capsicum sandboxes.
2018-01-22 18:15:36 +03:00
gnzlbg c099bb9ba3 add sys/auxv.h to build.rs 2018-01-19 12:11:14 +01:00
Alex Crichton 1f29ac3167 Move some containers to ubuntu 18.04
Apparently 17.04 is broken now?
2018-01-18 11:21:30 -08:00
Bryant Mairs 46933f0311 Add sockaddr_ctl on Mac 2018-01-14 22:26:46 -08:00
bors 1e80d93800 Auto merge of #896 - cneira:master, r=alexcrichton
added EPOLL(5)  for Illumos (Solaris fork)

EPOLL(5)  is being used in crates like mio and iovec , this change allows those crates and other that depends on EPOLL(5)  to be built in illumos systems.
2018-01-12 22:12:26 +00:00
neirac 3092748c95 adding epoll for illumos 2018-01-11 15:25:00 +00:00
Kelsey Z 586867d39a feat(linux): add mntent struct and related functions
Useful when playing around with mounting points, sadly not a common
interface
2018-01-11 21:57:30 +13:00
luozijun 536b5cfa86 Add bpf constant on macOS 2017-12-27 04:04:46 +08:00
luozijun 629908abe3 Add struct `bpf_hdr` on macOS 2017-12-27 04:03:39 +08:00
luozijun 5ea536a0a0 Add some constants for linux and macos 2017-12-26 10:36:01 +08:00
Jörg Thalheim 9f720f3c64 Add SECCOMP_MODE_* flags on Linux 2017-12-19 14:31:12 +00:00
bors a8c0a3bf3e Auto merge of #871 - asomers:mq, r=alexcrichton
POSIX mqueue bindings for the BSDs

Note that OpenBSD and OSX do not support POSIX message queues.
2017-12-17 00:54:16 +00:00
Alan Somers 831ca990d2 POSIX mqueue bindings for the BSDs
Note that OpenBSD and OSX do not support POSIX message queues.
2017-12-16 10:22:11 -07:00
luozijun f26f092c37 Add `net/if_utun.h` constants for macos platform and `linux/if_tun.h` for linux platform 2017-12-14 22:49:44 +08:00
luozijun 64246e006e remove include 2017-12-12 12:44:47 +08:00
luozijun 789fd5eb81 Add `sockaddr_dl` for all bsdlike 2017-12-12 11:24:00 +08:00
luozijun 2199ac4e42 fix freebsd include path 2017-12-12 08:19:39 +08:00
luozijun 7e0ccf206c fix include path 2017-12-12 08:07:00 +08:00
luozijun e3b0b81c44 update libc-test/build.rs 2017-12-12 00:52:39 +08:00
bgermann 85680dc23e Add some Solaris quirks 2017-11-18 22:03:14 +01:00
bgermann b3870b405b Prerequisites for Solaris testing support
With these changes there are no "undeclared"
errors for libc-test on Solaris anymore.
2017-11-18 14:57:54 +01:00
Steven Fackler 8f7839f41b Add dl_iterate_phdr and related types
A lot of this is more broadly supported than just Linux, but support for
those can be added later.
2017-11-10 20:04:08 -08:00
Bryant Mairs fa81ab39c7 Expose MFD_ constants on all Linux targets.
These aren't exposed on non-MIPS musl targets, but since they're
part of a kernel API, they're still applicable, so we just don't
test them there but expose them anyways.
2017-11-06 19:16:41 -08:00
Bryant Mairs c0935ac343 Add MFD_ constants for memfd_create 2017-11-05 13:52:59 -08:00
Marco A L Barbosa ae49626940 Add constants used by getrandom linux syscall 2017-11-02 10:33:29 -02:00
Marco A L Barbosa c9aba5f9ad Use ctest from git to allow testing linux x32 2017-10-27 11:01:20 -02:00
bors 7e33065ce4 Auto merge of #812 - malbarbo:x32, r=alexcrichton
Initial fixes for linux x32

Tested with a local build of rustc. The main test can be compiled but fails to execute (receives SIGTRAP, which I think in this case indicates memory violation, I will open an issue in the rustc repo).

This PR is important because it fixes the definition of `c_long` and `c_ulong`. Without these fixes, rustc crash with the error:

```
Cannot emit physreg copy instruction
UNREACHABLE executed at /checkout/src/llvm/lib/Target/X86/X86InstrInfo.cpp:5778!
```

Related https://github.com/rust-lang/rust/issues/37976
2017-10-19 16:40:53 +00:00
bors 2172bb4bab Auto merge of #802 - Mic92:setfsuid, r=alexcrichton
add setfsgid/setfsuid on Linux
2017-10-19 14:37:21 +00:00
Joerg Thalheim 3406fe94fa provide setfsgid/setfsuid also on android 2017-10-19 11:00:43 +01:00
Bryant Mairs 6d55c2496d Add termios2 for Android & Linux
Note that termios2 doesn't exist on powerpc(64), termios
is used instead.
2017-10-18 21:14:43 -07:00
Bryant Mairs 12cfa1ef46 Add BOTHER to Android & Linux 2017-10-18 20:57:34 -07:00
Marco A L Barbosa 343b7c15be Linux x32 does not support sysctl 2017-10-18 21:08:51 -02:00
Alex Crichton 9029cfb9eb Add more Linux-based syscall tables
* Add syscall tables to most remaining arches in `src/unix/notbsd`
* Add aarch64/arm musl to CI
* Update dependencies
2017-10-18 15:17:00 -07:00
Joerg Thalheim 8c24117c63 define SYS_renameat2 + flags on linux
Motivation: there is no glibc wrapper for this syscall
2017-10-16 19:20:35 +01:00
Vojtech Kral 4ed612c124 Fix glibc 2.26 incompatibilities #788 2017-10-09 20:38:56 +02:00
Jack Pappas 787addfa38 Add DCCP constant definitions. 2017-09-20 21:58:29 -04:00
bors d5236b0b91 Auto merge of #761 - LeoTindall:add_linux_iff_constants, r=alexcrichton
Add additional interface flags (IFF_)

Adds the three missing IFF_ constants (IFF_LOWER_UP, IFF_DORMANT, and IFF_ECHO) per nix-rust/nix#764
2017-09-12 19:39:52 +00:00
SilverWingedSeraph 6f170efdcf Prevent testing linux/if.h definitions on musl targets 2017-09-12 12:39:09 -05:00
SilverWingedSeraph 121795e34c Add tests for linux/if.h for additional IFF_ flags
Also remove unneeded platform gating
2017-09-12 09:15:45 -05:00
slyrz 340cbbfe75 Add timerfd API on Linux
This change adds the Linux-specific timerfd API to libc.
2017-09-09 13:02:29 +02:00
Bryant Mairs bd4c3489e5 Add QFMT_VFS_V1 on MIPS and test all QFMT_ constants 2017-08-29 19:33:22 -07:00
Alex Crichton 305cec31fb Fix musl build 2017-08-27 09:28:17 -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
Alex Crichton ce276177f2 Remove warnings in libc-test 2017-08-21 21:41:26 -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
Alex Crichton 201d539465 Remove OpenBSD CI
It's now broken due to changes in the `gcc` crate and having a too-old compiler,
and in general it's unfortunately architecturally so different from the other
test frameworks that it's difficult to maintain over time.
2017-08-18 09:34:08 -07:00
Sébastien Marie 7e349c0be6 Add exception in testsuite: the constants are new
they will be released with OpenBSD 6.2
2017-08-13 13:54:04 +02:00
Sébastien Marie 56701a7f70 skip siginfo_t.si_addr type check on OpenBSD
the type changed from *c_char to *c_void in 6.1
2017-08-13 12:29:45 +02:00
Bryant Mairs c9e6f55f1c Add MADV_FREE and MADV_SOFT_OFFLINE for Android/Linux 2017-08-10 19:21:22 -07:00
bors 0dae0e75bd Auto merge of #708 - wezm:remove-missing-openbsd-constants, r=alexcrichton
Add KERN_USERMOUNT and KERN_ARND to don't check list on OpenBSD

These [two constants are no longer in OpenBSD](3f376b0849/sys/sys/sysctl.h (L133-L140)). They were preventing the the tests from passing. With this change the test now pass:

```
CC=egcc cargo run
   Compiling libc v0.2.29 (file:///home/vagrant/libc)
   Compiling libc-test v0.1.0 (file:///home/vagrant/libc/libc-test)
    Finished debug [unoptimized + debuginfo] target(s) in 11.7 secs
     Running `/home/vagrant/libc/target/debug/libc-test`
RUNNING ALL TESTS
PASSED 5935 tests
```

They are still present in bitrig so I moved them there.
2017-08-04 10:40:32 +00:00
Wesley Moore 58c772bd51 Add KERN_ARND and KERN_USERMOUNT to don't check list on OpenBSD 2017-08-03 18:14:15 +10:00
Marcin Mielniczuk b9166f42ff Include sys/reg.h on Android. 2017-08-01 16:20:13 +02: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 2a5976727f Define i686 when TARGET=i686* 2017-07-22 09:37:22 +02:00
Marcin Mielniczuk 37b4e73a10 include sys/regs.h only on x86 and x86_64 2017-07-21 21:55:47 +02:00
Marcin Mielniczuk 1535ee8703 Include sys/user.h in the automatic test 2017-07-21 17:11:30 +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 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
Gabriel f60ff2db55 Ignore newer kernel constants if building with musl 2017-07-20 00:28:08 +02:00
Guillaume Gomez 100f3f29cf Add mac structs 2017-07-19 20:54:24 +02:00
Gabriel 75e3696eca Include linux/falloc.h directly
glibc support is behind, as indicated by
https://github.com/karelzak/util-linux/blob/master/sys-utils/fallocate.c
2017-07-19 06:52:12 +02:00
Guillaume Gomez e7df808d68 Add header for mac targets 2017-07-16 22:22:32 +02: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 9f5766fb3f add missing socket constants 2017-07-10 10:52:20 +02: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
Mateusz Sieczko 60d93226ff Add structs defined in linux/input.h 2017-06-14 21:48:41 +02: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 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
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
Andrew Salmon 6fb7c90ad0 sys/times.h, setreuid/setregid, and sigpending 2017-05-26 15:24:54 -07:00
Andrew Salmon bc48202e14 remove getitimer and setitimer
_GNU_SOURCE works differently than other libraries and creates
function pointer issues
2017-05-26 12:47:53 -07:00
bors fda4049c11 Auto merge of #596 - Susurrus:master, r=alexcrichton
Use NOCANCEL variants for close on Mac

The default `close()` on OS X does not provide clear errors, instead the `$NOCANCEL` variants should be used. These are available as of OS X 10.6 onwards.

Fixes #595.
2017-05-19 14:10:33 +00:00
Bryant Mairs 9b9f36aefc Use NOCANCEL variants for close on Mac
The default  on OS X does not provide clear errors,
instead the NOCANCEL variants should be used. These are available
as of OS X 10.6 onwards.
2017-05-18 12:04:28 -07:00
Lee Bousfield 98889cf243 Add ENOATTR for Linux 2017-05-18 09:02:25 -06:00
bors 19f3be3638 Auto merge of #578 - cactorium:master, r=alexcrichton
Steps towards support for musl-unknown-linux-uclibc

Hello! I've been working towards resolving https://github.com/rust-lang/libc/issues/361 , this PR compiles successfully with a newish compiler (with some minor fixes in `gcc`, `ctest`), and all the tests pass for `libc-ctest`. Basically most of the undefined functions, constants, and structs were just removed from the ctest, and then any constants that weren't correct were fixed. Would it make more sense to conditionally remove them from libc? I wasn't sure when it was appropriate to skip the test for it instead of removing the function/constants, so I just removed all the tests for now because that was a little easier than hunting them down. I'm also guessing the way some of the constants were conditionally set wasn't the correct style, would you guys have any advice on how to do it more correctly? Lemme know how it looks!
2017-05-08 14:49:12 +00:00
Lee Bousfield fdbfe8fc91 Add xattr functions for OSX 2017-05-07 17:05:51 -06:00
Kelvin Ly c0bec43234 Remove MAP_HUGETLB from mips-unknown-linux-uclibc 2017-05-06 02:49:54 -04:00
Kelvin Ly 96a830648d Merge branch 'master' into master 2017-05-04 22:08:48 -04:00
bors 03562b0cb2 Auto merge of #585 - jonhoo:res_init, r=alexcrichton
Add res_init

The `res_init` function, while deprecated, is critical for making networked applications work correctly when switching between networks, or between being offline and online. By default, `getaddrinfo` and friends use a cached version of `/etc/resolv.conf`, which means that network changes are not picked up by applications after they first start up. This has bitten [Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=214538), [Pidgin](https://developer.pidgin.im/ticket/2825), [MongoDB](https://jira.mongodb.org/browse/DOCS-5700), and more in the past.

The logic behind exposing only `res_init` is that it is the only `res_*` function that is frequently called directly by user applications. The other `res_*` functions provide low-level access to domain lookups, whereas `res_init` is useful even if the application itself is not concerned with doing lookups.

Behind the scenes, `getaddrinfo` in glibc [ultimately calls](a2f34833b1/resolv/nss_dns/dns-host.c (L196)) `res_nsearch` with `&_res`. `res_init` operates directly on this global reference, and is thus more useful to expose for most applications than the non-deprecated `res_ninit` function (which operators on an arbitrary `res_state`).

As far as I can tell, `res_init` is available in [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=res_init&manpath=SuSE+Linux/i386+11.3), [NetBSD](http://netbsd.gw.com/cgi-bin/man-cgi?res_init+3+NetBSD-6.1), [OpenBSD](http://man.openbsd.org/resolver.3), [Solaris](http://www.polarhome.com/service/man/?qf=res_init&tf=2&of=Solaris&sf=), [Linux](https://linux.die.net/man/3/res_init), and [macOS](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man3/res_init.3.html).
2017-05-03 22:30:49 +00:00
Jon Gjengset be7e45f6f5
Skip res_init test on macOS/iOS 2017-05-03 15:57:39 -04:00
NODA, Kai 61c23fb927
Add Linux-specific recvmmsg(2) and sendmmsg(2)
There is a compatibility issue regarding the type of a flag parameter:
int vs uint. Linux does declare the syscall to use uint and musl
followed it, but it is incompatible with other POSIX recv*/send*
syscalls. So it seems to be wise to follow the glibc version of
prototypes with int.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2017-05-02 07:46:52 -04:00
Jon Gjengset afebd98131
Android doesn't expose res_init in header file 2017-04-28 22:23:33 -04:00
Jon Gjengset ef20ddbc57
Add binding for res_init.
Some notes about the particularities of the changes:

res_init has been deprecated in favor of res_ninit, and many (but not
all) targets have therefore renamed the link name to __res_init. For
example, this happened in glibc in version 2.2:
https://bugzilla.redhat.com/show_bug.cgi?id=43822#c6
In these systems, res_init is #defined to __res_init in resolv.h, which
lets existing C programs continue to be compiled.

Unfortunately, this define doesn't automatically apply to our Rust code.
We therefore need to manually map the link name of res_init as
appropriate for each target:

macOS and iOS use res_9_init: 3908694d63/src/libresolv/resolv.h (L316)
Solaris uses res_init: https://java.net/projects/solaris/sources/on-src/content/usr/src/head/resolv.h
OpenBSD uses __res_init: f3b3b7c7ca/include/resolv.h (L268)
FreeBSD uses __res_init: 6911f4a88c/include/resolv.h (L290)
NetBSD uses __res_init: http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/include/resolv.h
glibc uses __res_init: a2f34833b1/resolv/resolv.h (L259)
eglibc uses __res_init: 7f0bcce417/resolv/resolv.h (L259)
musl uses res_init: 0a11d7cb13/include/resolv.h (L128)
Android uses res_init: 306ea55952/libc/include/resolv.h (L57)

One caveat here is that NetBSD doesn't seem to use the symbol name
__res_init yet, despite the redefine being present in resolv.h. At least
Travis fails for the netbsd target if __res_init is used. This may
change in the future.

iOS and macOS both unfortunately require linking with libresolv, despite
the symbols technically being available without libresolv:
resolv: http://blog.achernya.com/2013/03/os-x-has-silly-libsystem.html
Android and OpenBSD fall in the same category.
2017-04-28 10:58:25 -04:00
Kelvin Ly c14178c305 Fix indentation, remove more constants that don't work for uclibc 2017-04-26 23:01:05 -04:00
Kelvin Ly 2a9b6470d6 Remove extra comment 2017-04-21 18:34:12 -04:00
Kelvin Ly 26670c77b7 Fix build errors for mips-unknown-linux-uclibc 2017-04-21 18:20:08 -04:00
Kelvin Ly 2d6c7dad20 Fix more stuff after updating libc 2017-04-20 18:42:59 -04:00
bors c34a802d1e Auto merge of #572 - malbarbo:android-x86_64, r=alexcrichton
Add x86_64-linux-android support

When rust add support for x86_64-linux-android, the tests may be run with:
`rustup target add x86_64-linux-android && bash ci/run-docker.sh x86_64-linux-android`.

Android x86_64 emulator does not work without hardware acceleration, so we are not able to run tests on travis.
2017-04-20 14:46:39 +00:00
Kelvin Ly 9a835580a6 Add changes to allow uclibc to build 2017-04-20 02:37:31 -04:00
Marco A L Barbosa 3ca6ad9a3f Fix x86_64-linux-android failing tests 2017-04-19 12:24:45 -03:00
superriva 2122616185 Add IPC,SHM,MSG for Freebsd
INFO for the patch:
FREEBSD [https://github.com/freebsd/freebsd]

        /sys/sys/_types.h
typedef    long        __key_t;

        /sys/sys/types.h
typedef    __key_t        key_t;

        /sys/sys/ipc.h

struct ipc_perm {
    uid_t        cuid;
    gid_t        cgid;
    uid_t        uid;
    gid_t        gid;
    mode_t        mode;
    unsigned short    seq;
    key_t        key;
};

key_t    ftok(const char *, int);

        /sys/sys/msg.h

typedef    unsigned long    msglen_t;
typedef    unsigned long    msgqnum_t;

struct msqid_ds {
	struct	ipc_perm msg_perm;
	struct	msg *msg_first;
	struct	msg *msg_last;
	msglen_t msg_cbytes;
	msgqnum_t msg_qnum;
	msglen_t msg_qbytes;
	pid_t	msg_lspid;
	pid_t	msg_lrpid;
	time_t	msg_stime;
	time_t	msg_rtime;
	time_t	msg_ctime;
};

struct msg {
	struct	msg *msg_next;
	long	msg_type;
	u_short	msg_ts;
	short	msg_spot;
	struct	label *label;
};

struct msginfo {
    int    msgmax,
        msgmni,
        msgmnb,
        msgtql,
        msgssz,
        msgseg;
};

int msgctl(int, int, struct msqid_ds *);
int msgget(key_t, int);
ssize_t msgrcv(int, void *, size_t, long, int);
int msgsnd(int, const void *, size_t, int);

        /sys/sys/shm.h

typedef unsigned int shmatt_t;

struct shmid_ds {
    struct ipc_perm shm_perm;
    size_t          shm_segsz;
    pid_t           shm_lpid;
    pid_t           shm_cpid;
    shmatt_t        shm_nattch;
    time_t          shm_atime;
    time_t          shm_dtime;
    time_t          shm_ctime;
};

void *shmat(int, const void *, int);
int shmget(key_t, size_t, int);
int shmctl(int, int, struct shmid_ds *);
int shmdt(const void *);

	/sys/security/mac/mac_internal.h
struct label {
	int		l_flags;
	intptr_t	l_perpolicy[MAC_MAX_SLOTS];
};

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update build.rs

Update mod.rs

Update mod.rs

Update build.rs

Update mod.rs

Update build.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update mod.rs

Update build.rs

Update build.rs

Update mod.rs

Update mod.rs
2017-04-04 10:13:43 +03:00
Marco A L Barbosa bfeb3606f2 Merge branch 'master' into ci-android 2017-02-27 17:25:43 -03:00
bors dc1aa0e2c0 Auto merge of #530 - berkowski:baud_constants, r=alexcrichton
Added baudrate constants.

Addresses #528, adding baudrate constants for `bsd` and `notbsd` flavors of `unix`.

Passes `libc-test` locally on ubuntu 14.04 LTS with the additional (uncommitted) entries into in `build.rs`:

```
cfg.skip_const( move |name| {
        match name {
            # ... snip ...
            "PTRACE_O_SUSPEND_SECCOMP" |
            "CLONE_NEWCGROUP" |
            "NETLINK_LIST_MEMBERSHIPS" |
            "NETLINK_LISTEN_ALL_NSID" |
            "NETLINK_CAP_ACK" |
            "PR_CAP_AMBIENT_CLEAR_ALL" |
            "PR_CAP_AMBIENT_LOWER" |
            "PR_CAP_AMBIENT_RAISE" |
            "PR_CAP_AMBIENT_IS_SET" |
            "PR_CAP_AMBIENT" |
            "PR_FP_MODE_FRE" |
            "PR_FP_MODE_FR" |
            "PR_GET_FP_MODE" |
            "PR_SET_FP_MODE" |
            "PR_MPX_DISABLE_MANAGEMENT" |
            "PR_MPX_ENABLE_MANAGEMENT" |
            "PR_GET_THP_DISABLE" |
            "PR_SET_THP_DISABLE" |
            "PR_SET_MM_MAP_SIZE" |
            "PR_GET_MM_MAP_SIZE" |
            "PR_SET_MM_MAP" |
            "NLM_F_DUMP_FILTERED" |
            "EPOLLEXCLUSIVE" => true,

            _ => false,
        }
    });
```
I'm assuming this is because I'm stuck using `linux-libc-dev:3.13.0-24.46` for the moment and those constants are defined in newer versions.
2017-02-24 20:25:55 +00:00
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
Zac Berkowitz 004814849d Removed "rpcsvc/rex.h" from `build.rs` for OpenBSD
```
export TARGET=x86_64-unknown-openbsd
export QEMU=openbsd.qcow2
sh ci/run-docker.sh $TARGET
```
Passes when run localy.
2017-02-24 18:51:51 +00:00
Zac Berkowitz e8fc9928cd Removed "termios.h" from `build.rs` openbsd case.
Adding `termios.h` behind `rpcsvc/rex.h` does not solve the #define
clash since `rex.h` also defines the `_SYS_TERMIOS_H_` include guard.
2017-02-24 17:20:34 +00: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
Marco A L Barbosa bad80ba4d7 Add definitions to Android to allow fs2 crate compile 2017-02-21 17:17:46 -03:00
Ryan Moeller 7c03711d45 Add jail functions and constants for FreeBSD 2017-02-21 00:41:12 +00:00
Zac Berkowitz e393a2d4a0 Adding termios.h to openbsd headers.
Attempting to correct for conflicting defines from `rpcsvc/rex.h`
2017-02-20 20:49:19 +00:00
Kevin Brothaler 7fbff3a443 Fix for removed OS X constants.
https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOS10_12/Swift/Darwin.html
Fixes https://github.com/rust-lang/libc/issues/480
2017-01-16 12:49:49 -04:00
Michael Neumann 7134822dd2 Skip signedness test for sem_t on DragonFly 2016-12-04 13:05:01 +01:00
Michael Neumann 09bff052a9 Include aio.h on DragonFly as well 2016-12-04 12:46:17 +01:00
Alex Crichton 8726270a8e Merge pull request #456 from alexcrichton/cache-things
Share the host's `target` directory for tests
2016-11-18 09:00:09 -06:00
Alex Crichton c2842463e5 Share the host's `target` directory for tests
This helps caching between runs and can help speed up turnaround time for
various operations. The old android container didn't work out for some reason
due to permissions so the definition has now been vendored locally to just
rebuild it each time.
2016-11-17 11:30:17 -08:00
Alan Somers 9860c2935a Fix tests on FreeBSD 11
FreeBSD svn r262489 removed some *_MAXID definitions in sys/sysctl.h.  They never
should've been used outside of the FreeBSD base system anyway.  Mark them as
deprecated, hide them from the API docs, and disable their tests.

r273250 removed MAP_RENAME and MAP_NORESERVE, flags used by mmap(2), but old
binaries that use them will still work.  Suppress their test errors.

r294930 changed stack_t.ss_sp from a char* to a void*.  Suppress its test error.
2016-11-15 20:54:43 -07:00
Alan Somers e0ff0d6185 Fix more CI errors in PR #449 2016-11-13 14:35:17 -07:00
Alan Somers 9245e0727b Fix various CI errors in PR #449 2016-11-13 13:52:34 -07:00
Alan Somers 4ec884ac6d Fix undefined symbol errors in CI 2016-11-13 08:07:45 -07:00
Alex Crichton 852db737b3 Merge pull request #441 from billiob/setfsuid
Add setfsgid()/setfsuid() on linux
2016-11-06 00:37:48 -07:00
Boris Faure 28d0afa657 Add setfsgid()/setfsuid() on linux 2016-11-05 21:19:53 +01:00
Boris Faure da445b99f2 Fix typo in comment 2016-11-05 20:16:50 +01:00
Alex Crichton 78070bdf28 Try to fix powerpc64 and update to crates.io ctest 2016-10-20 17:23:23 -07:00
Alex Crichton 739edbc468 Use workspaces in this repo
Also cache on appveyor to speed up builds.
2016-10-08 17:26:56 -07:00
Alex Crichton 10142aa24a Add checksums to cargo lock files 2016-09-29 19:20:58 -07:00
Philipp Keller 04d0b71d2c Add missing header shadow.h 2016-09-27 07:19:17 +02:00
Alexander Schlarb 7590565993 Add System V message queue bindings for Linux (glibc/musl) 2016-09-18 13:14:28 +02:00
Jorge Aparicio bcc44dfee8 libc-test: cargo update 2016-09-11 17:52:45 -05:00
Alex Crichton 351df2ddef Bump to 0.2.16 2016-09-08 15:01:24 -07:00
bors af23c1e5f1 Auto merge of #365 - alexcrichton:more-arch, r=alexcrichton
Add more architectures to libc-test

* `i686-unknown-linux-musl`
* `powerpc-unknown-linux-gnu`
* `powerpc64-unknown-linux-gnu`

cc @japaric
cc https://github.com/rust-lang/rust/issues/36006
2016-08-27 11:26:39 -07:00
Alex Crichton a097ff6d35 Add ci for i686-unknown-linux-musl 2016-08-26 19:49:16 -07:00
Knight 866c9e4cb7 libc-test: ignore user-defined struct 2016-08-09 14:38:11 +08:00
Knight 0e0fb686d6 libc-test: allow deprecated functions
glibc-2.24 deprecates readdir_r() and readdir64_r()
2016-08-09 14:38:11 +08:00
Alex Crichton 6c18f30543 Bump to 0.2.15 2016-08-04 08:19:48 -07:00
Knight a6b283b133 Add header file for utmp(x) 2016-07-27 19:42:36 +08:00
Tomasz Miąsko c4947bbb6d Define _NETBSD_SOURCE when building on NetBSD.
Both pthread_condattr_setclock and pthread_condattr_getclock are guarded
by #if defined(_NETBSD_SOURCE) on NetBSD.
2016-07-21 08:14:58 +02:00
Sergey Bugaev a98c983cf0 Linux: add reboot() and constants 2016-07-12 13:22:51 +03:00
Alex Crichton 1f946a018a Bump to 0.2.14 2016-07-11 09:04:28 -07:00
Alex Crichton 760dd0b6dc Bump to 0.2.13 2016-06-28 10:02:55 -07:00
Alex Crichton 91c5dbf579 Bump to 0.2.12 2016-06-10 05:19:19 -07:00
Steven Fackler 41699f7406 Add semaphore APIs 2016-06-05 17:26:11 +01:00
Raphael Cohn e6150ae2b9 Adding sysinfo() and sysinfo struct for Linux and Android.
Sadly, the sysinfo struct varies slightly between Musl and Glibc / Bionic.

This means that users need to be careful when using the uptime, and should
always cast it to a signed value. Why uptime can be signed is beyond me...
2016-05-20 11:17:22 +01:00
Raphael Cohn 7fc0969900 Substantial changes to better support Solaris and BSD variants.
Removed CODE, as its definition and name varies too wildy and I
have no current code using it to test permutations with.

Moved LOG_NFACILITIES down, as Mac OS X defines this value
differently.

Added Mac OS X specific LOG_* facilities.

Added FreeBSD / DragonFly BSD specific LOG_* facilities.

Moved LOG_PERROR down, as all platforms bar Solaris define this.

Moved LOG_CRON down, as Solaris defines this with a different value.

Moved LOG_AUTHPRIV and LOG_FTP down, as all platforms bar Solaris
define these.

Looks like Solaris is suffering from the bit rot of commercial Unix...
2016-05-05 15:41:21 +01:00
Alex Crichton 959c6ab21b Bump to 0.2.11 2016-05-03 09:39:11 -07:00
Kamal Marhubi 9569599507 linux: Add prlimit(2) and prlimit64(2)
As with `getrlimit` and `setrlimit`, the glibc wrappers have a non-`int`
for the `resource` argument, eg:

    extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
                        const struct rlimit *__new_limit,
                        struct rlimit *__old_limit) __THROW;
2016-04-29 09:49:19 -04:00
Kai Noda cba130bc01
Explain about the automated tests on Travis
in order to advise contributors to locally test their patches.

Also update ctest to include a fix on rerun-if-changed so that human
developers doing trial & error can properly test their latest code.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-04-27 08:35:18 +08:00
Alex Crichton b302bed9d2 Bump to 0.2.10 2016-04-12 11:09:00 -07:00
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
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
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
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
Alex Crichton 3de1107244 Bump to 0.2.9 2016-03-30 17:40:32 -07:00
A.J. Gardner b788a5c736 Add locale.h in libc-test 2016-03-30 01:13:55 -05:00
Alex Crichton 609693dae1 Update winapi 2016-03-14 21:59:21 -07:00
Kamal Marhubi 89a7700e23 apple: Add openpty(3) and forkpty(3) 2016-03-08 23:47:03 -05:00
Alex Crichton 95a56522db Update the libc-test lockfile 2016-03-07 13:12:43 -08:00
Alex Crichton c173d9c5d5 Merge branch 'ucontext' of https://github.com/fiveop/libc into merge 2016-02-29 21:12:03 -08:00
Philipp Matthias Schaefer 7e3a151289 Add ucontext struct for Linux/x86 2016-02-29 19:44:41 +01:00
Sebastian Wicki 35420e2e03 Re-enable some Rumprun tests 2016-02-29 19:32:51 +01:00
Michael Neumann a09fe71617 Fix a couple of issues spotted by alexcrichton.
See comments https://github.com/rust-lang/libc/pull/194.

Note on struct utsname: Neither using a constant, nor a conditional
macro seems to work, so I just created an ugly utsname with conditions
on each field. This should also fix the CI fallout. #[cfg] on macros
doesn't work?

As DragonFly only supports one platform, I merged  x86_64.rs into
dragonfly/mod.rs.
2016-02-21 12:28:10 +01:00
Michael Neumann a6a64d17a0 Squashed commit of the following:
Running libc-test: PASSED 3426 tests

commit 1a7ee714db34f17abd33dc9262d3e10275eec68d
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:30:56 2016 +0100

    Fix RLIM_POSIXLOCKS ->  RLIMIT_POSIXLOCKS

commit 09c49a97ebebf087486659ef8277610d99e5c7b3
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:29:24 2016 +0100

    Ignore signedness check for uuid_t on DragonFly

commit aab4d11f59917686280c271683bf00ff34c8040d
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:23:21 2016 +0100

    Move FreeBSD-only function into freebsd/mod.rs

commit 9921f030b103dbccb37930ab1d64cf1dd587bd48
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:21:42 2016 +0100

    Move POSIX_FADV_* to freebsd/mod.rs

commit 2921c2db1e3d0314375aa371936bd227cc6c6e2a
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:20:11 2016 +0100

    Fix signedness of blksize_t for DragonFly

commit 65e817baee9e01d2d7c86c6202c63ee46d218914
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:19:02 2016 +0100

    Fix Q_{GET,SET}QUOTA for DragonFly

commit a0d2d63ef88206d321222140ae6b3d92c93b51bd
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:17:27 2016 +0100

    Fix RLIMIT_* for DragonFly

commit d04a1600a7c66a792a481e1524a1652234a69939
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:12:09 2016 +0100

    Fix ELAST for DragonFly

commit d120b9278426a76ee106e91e6c999885c1f5c7f4
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:10:28 2016 +0100

    Fix F_GETLK, F_SETLK, F_SETLKW for DragonFly

commit 963f7da270a14f4d12ea1a52301e363ce745c897
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:08:51 2016 +0100

    Fix O_CLOEXEC for DragonFly

commit f4d6c9d5991d690c7cb4460790a8e37e713bc034
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:07:18 2016 +0100

    Fix RAND_MAX for DragonFly

commit ba48336da7be613a49702ad9de445ab3850ebb7c
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 13:04:48 2016 +0100

    Fix statvfs for DragonFly

commit 9ae480c60a7d77b31a17d34320464f4179e40a4a
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 12:51:47 2016 +0100

    Fix fd_set for DragonFly

commit a15e027838288c4980371c503252cca7e32356c0
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 12:42:24 2016 +0100

    Fix all remaining issues on DragonFly

    Missing functions and missing constats.

commit 3966e4fce0cb81bd0b3ed8cdf50611e6982f7767
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 12:27:14 2016 +0100

    Use a macro instead of a constant.

    When using a constant, the libc-test thinks this constant
    exists as an C equivalent.

commit 9b5659aaf54419f317250cb3a4692a1c14fdbc33
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 12:21:01 2016 +0100

    Use a constant in utsname

commit 50484eda3c978a9c0a9652f6fc619c41ad349c2d
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 12:17:55 2016 +0100

    Fix struct utsname

commit 832e94248fabc91574d6d42630168da3542c153f
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 12:07:08 2016 +0100

    DragonFly has different stat, dirent, clock_t, ino_t, nlink_t, blksize_t

commit f3152a369d75ae8c1558afa5a59aa55e33b33ec6
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 11:52:54 2016 +0100

    Move DragonFly related stuff into dragonfly/*

    Replicate x86_64.rs from FreeBSD. Need some twists.

commit 9fe35124064aa92303171d019004df119f948223
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 11:49:38 2016 +0100

    Move FreeBSD code under freebsd/*.

    Next commit will replicate some of the architecture dependent stuff
    for DragonFly.

commit e91983df8deb14004f7a0fe47878f0e4eb31198d
Author: Michael Neumann <mneumann@ntecs.de>
Date:   Sat Feb 20 11:44:25 2016 +0100

    struct utsname has a different size on DragonFly
2016-02-20 13:34:01 +01:00
Alex Crichton 87e6c65c74 Bump to 0.2.7 2016-02-09 13:26:02 -08:00
Kamal Marhubi 143358bb97 unix: Add sendfile to platforms that support it 2016-02-06 15:02:19 -05:00
Brian Anderson 773aab8293 Add musl definitions for x86, arm and asmjs
I've tested x86 against C locally, but not arm or asmjs.
I added the arm definitions because asmjs's C is derived from arms.

Mysteriously, my locally-built musl does not contain a
definition for _SC_2_C_VERSION, so I just removed it.
2016-01-29 21:51:06 +00:00
Alex Crichton 381be4bcb0 Bump to 0.2.6 2016-01-26 16:02:21 -08:00
Alex Crichton 2abaf33ed0 Bump to 0.2.5 2016-01-21 09:53:49 -08:00
Alex Crichton bb6f198a20 Fix all definitions on FreeBSD
* The `flock` structure has an extra field
* Some `flock`-related constants have different value
* Some constants like `TABN` don't exist
* The `fsblkcnt_t` and `fsfilcnt_t` type definitions are u64 for x86_64 FreeBSD
* The `d_namelen` field in `dirent` was renamed correctly to `d_namlen`
* The alignment of `fd_set` was off, and the macros were updated to not always
  assume a 32-bit integer is used.
2016-01-18 22:54:28 -08:00
Alex Crichton d820c4a8f7 Add OpenBSD and FreeBSD CI to Travis
This commit adds support to test all libc definitions on both OpenBSD and
FreeBSD via QEMU userspace emulation. Specially prepared images for each OS are
used which are essentially intended to run a script on startup and then exit.
Documentation has been added to the `ci/README.md` file describing this new
system.
2016-01-18 22:54:28 -08:00
Jim Blandy f8772f7e52 Skip C/Rust type checks for eventfd. 2016-01-12 16:28:07 -08:00
Jim Blandy 9b53e54dd5 Don't #include <linux/fs.h>; libc's API is described by <sys/mount.h>.
Adjust MIPS MS_RMT_MASK to match <sys/mount.h>.
2016-01-11 21:02:45 -08:00
Alex Crichton fc1b0ad67c Merge branch 'master' of https://github.com/diwic/libc into merge 2016-01-10 14:21:13 -08:00
David Henningsson 9d2493e8bf Add poll API
Signed-off-by: David Henningsson <diwic@ubuntu.com>
2015-12-25 23:06:37 +01:00
Sébastien Marie 6c8a63a9e2 keep openbsd name for dirent field member 2015-12-23 20:23:06 +01:00