Skip to content

Commit 3ecdafb

Browse files
Updating for formatting _time64, and gnu test failures
1 parent 785a60c commit 3ecdafb

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/windows/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ pub const ENOTRECOVERABLE: ::c_int = 127;
215215
pub const ENOTSOCK: ::c_int = 128;
216216
pub const ENOTSUP: ::c_int = 129;
217217
pub const EOPNOTSUPP: ::c_int = 130;
218-
pub const EOTHER: ::c_int = 131;
219218
pub const EOVERFLOW: ::c_int = 132;
220219
pub const EOWNERDEAD: ::c_int = 133;
221220
pub const EPROTO: ::c_int = 134;
@@ -378,8 +377,6 @@ extern "C" {
378377
n: size_t,
379378
) -> ::size_t;
380379

381-
pub fn time(destTime: *mut time_t) -> time_t;
382-
383380
pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
384381
pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
385382
pub fn memcpy(
@@ -403,6 +400,8 @@ extern "C" {
403400
pub fn signal(signum: c_int, handler: sighandler_t) -> sighandler_t;
404401
pub fn raise(signum: c_int) -> c_int;
405402

403+
#[link_name = "_time64"]
404+
pub fn time(destTime: *mut time_t) -> time_t;
406405
#[link_name = "_chmod"]
407406
pub fn chmod(path: *const c_char, mode: ::c_int) -> ::c_int;
408407
#[link_name = "_wchmod"]
@@ -471,8 +470,11 @@ extern "C" {
471470
#[link_name = "_lseek"]
472471
pub fn lseek(fd: ::c_int, offset: c_long, origin: ::c_int) -> c_long;
473472
#[link_name = "_lseeki64"]
474-
pub fn lseek64(fd: ::c_int, offset: c_longlong, origin: ::c_int)
475-
-> c_longlong;
473+
pub fn lseek64(
474+
fd: ::c_int,
475+
offset: c_longlong,
476+
origin: ::c_int,
477+
) -> c_longlong;
476478
#[link_name = "_pipe"]
477479
pub fn pipe(
478480
fds: *mut ::c_int,

src/windows/msvc.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
pub const L_tmpnam: ::c_uint = 260;
22
pub const TMP_MAX: ::c_uint = 0x7fff_ffff;
33

4+
// POSIX Supplement (from errno.h)
5+
// This particular error code is only currently available in msvc toolchain
6+
pub const EOTHER: ::c_int = 131;
7+
48
extern "C" {
59
#[link_name = "_stricmp"]
610
pub fn stricmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int;

0 commit comments

Comments
 (0)