Commit Graph

2527 Commits

Author SHA1 Message Date
alecmocatta
6ce007f291
add FIO* for freebsd 2019-01-08 12:21:46 +00:00
bors
22b08f8eed Auto merge of #1196 - asomers:uname_freebsd, r=alexcrichton
Fix uname on FreeBSD

On FreeBSD, uname is an inline function.  The uname that is present in
libc.so is for FreeBSD 1.0 compatibility.  It expects a buffer of a
different size.

Fixes #1190
Reported-by: Alex Zepeda
2019-01-03 20:30:55 +00:00
Alan Somers
36baf9323d Fix uname on FreeBSD
On FreeBSD, uname is an inline function.  The uname that is present in
libc.so is for FreeBSD 1.0 compatibility.  It expects a buffer of a
different size.

Fixes #1190
Reported-by: Alex Zepeda
2019-01-03 08:53:50 -07:00
bors
a9e3cc6c1b Auto merge of #1195 - glaubitz:new-release, r=alexcrichton
Bump version to 0.2.46

New release required for https://github.com/rust-lang/rust/pull/57121
2019-01-03 01:51:19 +00:00
John Paul Adrian Glaubitz
11d1a181d2 Bump version to 0.2.46 2019-01-02 21:00:19 +01:00
bors
67fd35d0f3 Auto merge of #1193 - alexcrichton:test, r=alexcrichton
Test out new bors integration

See if it works with Cirrus CI!
2019-01-02 18:45:17 +00:00
Alex Crichton
09c4c2345b Test out new bors integration
See if it works with Cirrus CI!
2019-01-02 10:27:19 -08:00
Alex Crichton
1650b395ae
Merge pull request #1191 from asomers/cirrus_badge
[skip ci] Add a Cirrus-ci.com build badge
2019-01-02 11:55:01 -06:00
bors
b2f7699394 Auto merge of #1189 - pusateri:recvdstaddr, r=alexcrichton
Add IP_RECVDSTADDR on netbsd.

Accidentally left out IP_RECVDSTADDR on NetBSD in #1184
2019-01-02 16:29:16 +00:00
Alan Somers
e3bb3d7f8e [skip ci] Add a Cirrus-ci.com build badge
Reported-by: Alex Zepeda
2019-01-01 19:26:36 -07:00
Tom Pusateri
2c95a0dc15 Add IP_RECVDSTADDR on netbsd. 2018-12-28 17:11:35 -05:00
bors
7b3d2c6fa7 Auto merge of #1184 - pusateri:recvif, r=gnzlbg
Add IP_RECVIF to BSD and IP_RECVDSTADDR to apple.

FreeBSD/OpenBSD do not support IP_PKTINFO for IPv4 but use IP_RECVIF for interface index and IP_RECVDSTADDR for destination address.
NetBSD and macOS also support IP_RECVIF and IP_RECVDSTADDR in addition to IP_PKTINFO.
(For IPv6, all use IPV6_PKTINFO)
2018-12-28 10:17:37 +00:00
Tom Pusateri
3229fca83a Add IP_RECVIF to BSD and IP_RECVDSTADDR to apple. 2018-12-26 21:53:20 -05:00
bors
16b6c0ee83 Auto merge of #1186 - glaubitz:fcntl-fixes, r=alexcrichton
Define missing F_RDLCK, F_WRLCK and F_UNLCK constants on linux-mips -and s390x

These are defined in the fcntl.h glibc header on MIPS and s390x
systems on Linux but missing in the libc crate, so add them as they
are required for the file locking API in rustc.
2018-12-26 17:32:06 +00:00
John Paul Adrian Glaubitz
63d1a8c160 Define missing F_RDLCK, F_WRLCK and F_UNLCK constants on linux-s390x
These are defined in the fcntl.h glibc header on s390x systems
on Linux but missing in the libc crate, so add them as they are
required for the file locking API in rustc.
2018-12-25 21:03:13 +01:00
John Paul Adrian Glaubitz
44fd808bcf Define missing F_RDLCK, F_WRLCK and F_UNLCK constants on linux-mips
These are defined in the fcntl.h glibc header on MIPS systems
on Linux but missing in the libc crate, so add them as they are
required for the file locking API in rustc.
2018-12-25 21:02:37 +01:00
bors
a4d41775f3 Auto merge of #1183 - xmclark:make-tm-members-public-windows, r=gnzlbg
make tm struct members public

This PR makes the members of `struct tm` public.

I see no reason why these fields should not be public fields. They are public in the other targets. I did a blame and it seems that they have been private since added a couple years ago.

53e0d387f8
2018-12-24 18:40:18 +00:00
bors
26ffb5c10a Auto merge of #1182 - xmclark:add-socket-functions-for-windows, r=alexcrichton
add some socket functions and a SOCKET type for windows

This PR adds a few of the socket functions for windows. Some targets use the `stdcall` calling convention for these functions, so I put them in an `extern "system"` block ([see the nomicon](https://doc.rust-lang.org/nomicon/ffi.html#foreign-calling-conventions)).
2018-12-24 18:15:28 +00:00
bors
8ee27008ff Auto merge of #1175 - Ralith:ip-tos, r=alexcrichton
Expose unix ECN-related constants

I'm not certain of the correctness of the BSD definition, but I assume that's what CI's for.
2018-12-24 17:34:07 +00:00
Alex Crichton
f0a6af02d3 Fix docs on nightly 2018-12-24 08:36:54 -08:00
Mackenzie Clark
1da1ffe0de make tm struct members public 2018-12-23 13:26:14 -08:00
Mackenzie Clark
b9d86a6e8a use the correct calling convention with extern "system" 2018-12-23 12:41:15 -08:00
Mackenzie Clark
a79a73f8bf add some socket functions and a SOCKET type 2018-12-22 23:37:53 -08:00
bors
c1ae35dad5 Auto merge of #1180 - xmclark:add-stdio-constants-windows, r=alexcrichton
add stdio constants for windows

A few useful constants for working with the stdio file descriptors.

I referenced the [msdn](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fileno?view=vs-2017) docs for the numbers, although I think 0,1,2 are standard  on most platforms for the stdio.
2018-12-21 18:45:40 +00:00
Mackenzie Clark
f1b396f3ba constants are for gnu target only 2018-12-21 09:55:13 -08:00
Mackenzie Clark
3ce82dd39f Revert "add exception for msvc"
This reverts commit 0581f926ff.
2018-12-21 09:54:01 -08:00
Mackenzie Clark
975eb6b5c7 Revert "instead backfill constants on msvc"
This reverts commit 0dd7f2d153.
2018-12-21 09:50:09 -08:00
Mackenzie Clark
0dd7f2d153 instead backfill constants on msvc 2018-12-20 15:39:42 -08:00
Mackenzie Clark
0581f926ff add exception for msvc 2018-12-20 15:28:12 -08:00
Mackenzie Clark
e92ed6d0ae add stdio constants for windows 2018-12-20 13:25:16 -08:00
bors
027d483461 Auto merge of #1176 - xmclark:add-signal-and-raise-windows, r=alexcrichton
add signal and raise bindings for windows

This PR adds `signal` and `raise` bindings for windows.

I don't know these functions or linux very well, so I leaned on other overrides of signal in the linux bindings, and the [cppreference page](https://en.cppreference.com/w/cpp/header/csignal) for adding the bindings.

I added some constants that were shown on the [microsoft signal page](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/signal?view=vs-2017) and used the default values I found spelunking through my own copy of `signal.h` that came along with visual studio.

The automated tests pass and my toy apps use the `signal` and `raise` as expected. Let me know if there is anything else I need to do, or any extra tests to write.

EDIT:
currently working on getting a nice isolated msys2 environment I can use to dev against.
- [x] msys2 env setup and building
2018-12-18 05:15:39 +00:00
Mackenzie Clark
af19934f29 normalize to common name sighandler_t 2018-12-17 19:31:31 -08:00
Mackenzie Clark
4c32b9f4b9 move everything back into window mod with the type alias for msvc 2018-12-17 17:57:37 -08:00
Mackenzie Clark
2f25aaa235 add edge case for mingw 2018-12-17 17:24:37 -08:00
Alex Crichton
8b63b1cfb0
Merge pull request #1177 from reitermarkus/macos-netdb
Add `AI_*` constants from `netdb.h` for macOS.
2018-12-17 12:53:32 -06:00
Markus Reiter
b8e64540af Add NI_* constants from netdb.h for macOS. 2018-12-17 16:44:24 +01:00
Markus Reiter
2a9c0c305f Add AI_* constants from netdb.h for macOS. 2018-12-17 16:44:24 +01:00
Mackenzie Clark
313483ba2e add signal and raise bindings
separate for gnu and msvc


scope resolve c_int

these types are not allowed, and more scope resolution


use size_t
2018-12-16 16:23:53 -08:00
Benjamin Saunders
0de81a6bdf Narrow IPTOS_ECN_... definitions 2018-12-15 01:39:32 -08:00
Benjamin Saunders
26c34b7e92 No IP_RECVTOS for DragonFlyBSD 2018-12-15 01:18:54 -08:00
Benjamin Saunders
948f2ab622 Add BSD IP_RECVTOS definitions 2018-12-14 23:12:47 -08:00
Benjamin Saunders
076edb21b1 Add IPV6 analogs 2018-12-14 19:14:42 -08:00
Benjamin Saunders
ae6a26284b Handle inconsistent spelling 2018-12-14 19:14:27 -08:00
Benjamin Saunders
0f9d41ff8a Style fix 2018-12-14 19:14:01 -08:00
Benjamin Saunders
ba5bfc6c07 Fix BSD IP_TOS value 2018-12-14 19:13:53 -08:00
Benjamin Saunders
94e30dfacd Expose unix ECN-related constants 2018-12-14 00:57:46 -08:00
Alex Crichton
ed8309bc03
Merge pull request #1174 from tklauser/mfd-hugetlb
Add MFD_HUGETLB const for linux
2018-12-13 09:34:16 -06:00
Tobias Klauser
df277e295b Add MFD_HUGETLB const for linux
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2018-12-13 13:27:00 +01:00
Alex Crichton
c66221d07d
Merge pull request #1172 from piersfinlayson/master
Fix for rust-lang/rust issue #50583
2018-12-11 15:47:36 -06:00
Piers Finlayson
a01c32d6c8 Fix for rust-lang/rust issue #50583 2018-12-10 19:55:38 +00:00