Commit Graph

2909 Commits

Author SHA1 Message Date
gnzlbg
7b45788a01 Refactor OpenBSD-like module into OpenBSD 2019-05-22 14:20:13 +02:00
bors
50f4b671cf Auto merge of #1354 - gnzlbg:gettimeofday, r=gnzlbg
[breaking change] gettimeofday 2nd argument incorrect in some targets

The second argument of `gettimeofday` was a `*mut c_void` on all targets,
but that type is incorrect in the following targets, where it should be
a `*mut timezone` instead:

On these other targets it appears that the signature of gettimeofday was incorrect (it takes a time-zone pointer instead of a void pointer):

*linux+gnu: http://man7.org/linux/man-pages/man2/gettimeofday.2.html
*freebsd: https://www.freebsd.org/cgi/man.cgi?query=gettimeofday&apropos=0&sektion=2&manpath=FreeBSD+11.2-stable&arch=default&format=html
*openbsd: https://man.openbsd.org/gettimeofday.2
*android: https://github.com/ricardoquesada/android-ndk/blob/master/usr/include/sys/time.h
*dragonfly: https://www.dragonflybsd.org/cgi/web-man?command=gettimeofday&section=2

This commit corrects the type on these targets, which is a breaking change. Due
to how this API is commonly used (e.g. passing `ptr::null_mut` to the second
argument), breakage should be minimal or non-existent (AFAICT only `time`, `libstd`, and `parking_lot` use this API, and they all should compile after this change). Users wanting to support both versions can just write `ptr as *mut _` instead.

Closes #1338.

---

On these targets, the signature of `gettimeofday` was correct (the second argument is a `void*`):

* macosx: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/gettimeofday.2.html
* linux+musl: http://git.musl-libc.org/cgit/musl/tree/include/sys/time.h#n11
* linux+newlib: 99fc6c1674/newlib/libc/include/sys/time.h (74)
* netbsd: http://netbsd.gw.com/cgi-bin/man-cgi?gettimeofday+2.i386+NetBSD-8.0
* newlib: https://github.com/devkitPro/newlib/blob/devkitA64/newlib/libc/include/sys/time.h#L370
* solaris/illumos: https://illumos.org/man/3C/gettimeofday
* emscripten: https://chromium.googlesource.com/external/github.com/kripken/emscripten/+/1.35.20/system/include/libc/sys/time.h#11

cc @alexcrichton
2019-05-22 09:54:52 +00:00
gnzlbg
759c837611 [breaking change] incorrect API of gettimeofday
The second argument of `gettimeofday` was a `*mut c_void` on all targets,
but that type is incorrect in the following targets, where it should be
a `*mut timezone` instead:

On these other targets it appears that the signature of gettimeofday was incorrect (it takes a time-zone pointer instead of a void pointer):

linux+gnu: http://man7.org/linux/man-pages/man2/gettimeofday.2.html
freebsd: https://www.freebsd.org/cgi/man.cgi?query=gettimeofday&apropos=0&sektion=2&manpath=FreeBSD+11.2-stable&arch=default&format=html
openbsd: https://man.openbsd.org/gettimeofday.2
android: https://github.com/ricardoquesada/android-ndk/blob/master/usr/include/sys/time.h
dragonfly: https://www.dragonflybsd.org/cgi/web-man?command=gettimeofday&section=2

This commit corrects the type on these targets, which is a breaking change. Due
to how this API is commonly used (e.g. passing `ptr::null_mut` to the second
argument), breakage should be minimal. Users wanting to support both versions
can just write `ptr as *mut _` instead.

Closes #1338.
2019-05-22 10:39:06 +02:00
bors
bf85aa6dfc Auto merge of #1340 - ibabushkin:mmap_flags, r=gnzlbg
Added MAP_FIXED_NOREPLACE and MAP_SHARED_VALIDATE consts.

This addresses #1339 and #1315. I believe the location of the constants is correct as-is, as both flags are linux-specific additions. Let me know if I missed anything.
2019-05-21 18:53:49 +00:00
bors
0b52da1c71 Auto merge of #1353 - sameo:topic/musl-seek, r=gnzlbg
linux/musl: Add SEEK_HOLE and SEEK_DATA constants

They are defined since Linux 3.1 but not in musl yet.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-05-21 16:52:26 +00:00
Inokentiy Babushkin
63e3932d54
Disabled MAP_SHARED_VALIDATE and MAP_FIXED_NOREPLACE on musl for now.
Because we cannot yet bring a more recent musl to the mips and mipsel
architectures, we disable support for these constant until a cascading
update with rust-lang/rust has been done.
2019-05-21 13:50:25 +02:00
Inokentiy Babushkin
6a97d64e02
Revert "An attempt to use upstream musl on mips."
This reverts commit 1a1b170a02.
2019-05-21 13:37:31 +02:00
Inokentiy Babushkin
3835253fc8
Revert "Fixed a typo in mips docker file."
This reverts commit 7b171fb15a.
2019-05-21 13:37:19 +02:00
Samuel Ortiz
5c31597f8f linux/musl: Add SEEK_HOLE and SEEK_DATA constants
They are defined since Linux 3.1 but not in musl yet.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-05-21 13:03:33 +02:00
Inokentiy Babushkin
7b171fb15a
Fixed a typo in mips docker file. 2019-05-20 16:55:08 +02:00
Inokentiy Babushkin
1a1b170a02
An attempt to use upstream musl on mips. 2019-05-19 16:53:59 +02:00
Inokentiy Babushkin
9f1db17852
Updated most musl versions in CI docker setup. 2019-05-19 14:12:33 +02:00
bors
caf17a0641 Auto merge of #1345 - jackpot51:patch-1, r=gnzlbg
Bump version to 0.2.55

This will bring in support for redox as part of the unix target_family, thus allowing https://github.com/rust-lang/rust/pull/60547 to move forward
2019-05-16 23:19:04 +00:00
bors
6bc42d40e5 Auto merge of #1342 - sunfishcode:master, r=gnzlbg
Update to the latest wasi-sysroot.

 - Rename `wasm32-unknown-wasi` to `wasm32-wasi`.
 - `__wasilibc_rmfileat` was renamed to `__wasilibc_unlinkat`
 - Add bindings for a few more functions and typedefs.
2019-05-16 21:51:36 +00:00
bors
6e3c6752f6 Auto merge of #1336 - faern:add-futex-consts, r=gnzlbg
Add futex constants

Adding some Futex constants. To be used in `parking_lot`. See https://github.com/faern/parking_lot/pull/1/files#r283110797
2019-05-16 20:51:07 +00:00
Linus Färnstrand
72463fc155 Add futex.h to test 2019-05-16 20:40:18 +02:00
Linus Färnstrand
2276fd3940 Add some FUTEX_ constants to Linux+Android 2019-05-16 20:37:10 +02:00
Dan Gohman
215cd1549e Update to the latest wasi-sysroot.
- Rename `wasm32-unknown-wasi` to `wasm32-wasi`.
 - `__wasilibc_rmfileat` was renamed to `__wasilibc_unlinkat`
 - Add bindings for a few more functions and typedefs.
2019-05-16 06:40:50 -07:00
Jeremy Soller
81dcf4c0ef
Bump version to 0.2.55 2019-05-16 06:53:06 -06:00
bors
8b14a7e95b Auto merge of #1335 - leo60228:patch-1, r=gnzlbg
Improve newlib constants

This is necessary to set socket options on the Nintendo Switch, which uses a socket implementation directly ported from FreeBSD. Reopened from #1334 because I accidentally closed that.
2019-05-16 11:19:32 +00:00
bors
5408b1079c Auto merge of #1332 - redox-os:redox-unix, r=gnzlbg
redox: convert to target_family unix

This is the first step to supporting https://github.com/rust-lang/rust/issues/60139.

In order to have a smooth transition, there will need to be a change made in rust at the same time, switching Redox over to the unix target family. See https://github.com/rust-lang/rust/pull/60547
2019-05-16 10:03:05 +00:00
bors
4ac8346b74 Auto merge of #1337 - gnzlbg:update_ubuntu, r=gnzlbg
Update CI from ubuntu 16.04 (EOL) to 19.04

Closes #1333 .
2019-05-16 09:04:07 +00:00
gnzlbg
8eceb62a3e Rename _wasi_rmfileat to _wasi_unlinkat 2019-05-16 11:03:45 +02:00
gnzlbg
5a0e37ec37 Add wasm32-wasi to ci/build.sh 2019-05-16 11:03:45 +02:00
gnzlbg
77a4683aa1 Remove bitrig support
See https://github.com/rust-lang/rust/pull/60775 .
2019-05-16 11:03:45 +02:00
gnzlbg
9183c00f7e Remove unecessarily disabling a warning on FreeBSD 2019-05-16 11:03:12 +02:00
gnzlbg
3ac67ebcf7 Rename wasm32-unknown-wasi to wasm32-wasi 2019-05-16 11:03:04 +02:00
gnzlbg
e07c7bdc17 Fix utmpx on Sparc64 2019-05-16 09:15:12 +02:00
gnzlbg
7ed51c1c8b Fix NFT_MSG_MAX on Sparc64 2019-05-16 09:15:12 +02:00
gnzlbg
b701d5c33a Fix NFT tables on Sparc64 2019-05-16 09:15:12 +02:00
gnzlbg
58091dfb5d Fix FLUSHO value on Sparc64 2019-05-16 09:15:12 +02:00
gnzlbg
198ead7247 ucontext_t ssp field uses c_long and not c_longlog 2019-05-16 09:15:12 +02:00
gnzlbg
3ac111c8d0 Try to fix builds of the Android SDK 2019-05-16 09:15:12 +02:00
gnzlbg
e7f62bc76a Fix utmpx.ut_session type on sparc64 2019-05-16 09:15:12 +02:00
gnzlbg
d808123728 Fix ucontext_t on x86 2019-05-16 09:15:12 +02:00
gnzlbg
4497a7867d Fix ucontext_t and NFT_MSG_MAX on x86_64 2019-05-16 09:15:12 +02:00
gnzlbg
e94f68c7d6 Link against correct scanf,fscanf,sscanf 2019-05-16 09:15:12 +02:00
gnzlbg
9df115b67f Update Ubuntu images to 19.04 2019-05-16 09:15:12 +02:00
gnzlbg
1a7ee21aec Define DEPRECATED_SCANF macro to use older scanf,sscanf,fscanf symbols 2019-05-16 09:15:12 +02:00
gnzlbg
0ae84518fe Update Debian image used in s390x build job 2019-05-16 09:15:12 +02:00
gnzlbg
57e1e84dce Update Debian image used in sparc64 build job to Debian 10.0 2019-05-16 09:15:12 +02:00
gnzlbg
2a131d2707 Update alignment of pthread_mutexattr_t 2019-05-16 09:15:12 +02:00
gnzlbg
24f8972b8d [breaking change] remove PTRACE_GET/SET/FP/REGS from s390x 2019-05-16 09:15:12 +02:00
gnzlbg
4a8fa6f1f0 Correct value of some NFT_ constants on AArch64 2019-05-16 09:15:12 +02:00
gnzlbg
bdb1816070 [breaking change] Remove SYS_syscalls and SYS_arch_specific_syscall from aarch64 2019-05-16 09:15:12 +02:00
gnzlbg
4c938e5b4b Move sparc64 Docker image to Ubuntu 2019-05-16 09:15:12 +02:00
gnzlbg
4aa5a45af1 Correct assert for mips+musl 2019-05-16 09:15:12 +02:00
gnzlbg
5d5ceeaf64 Correct value of some NFT_ constants on ARM 2019-05-16 09:15:12 +02:00
gnzlbg
be36f6859b execinfo not available in emscripten 2019-05-16 09:15:12 +02:00
gnzlbg
9212a9cf14 Update openjdk to version 11 in Docker containers 2019-05-16 09:15:12 +02:00