Skip to content

Commit 8da1afa

Browse files
committed
---
yaml --- r: 36409 b: refs/heads/try2 c: 0c8a009 h: refs/heads/master i: 36407: b9d5b24 v: v3
1 parent 4e52cb4 commit 8da1afa

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ef833d41014481acdfc19bfd50f27f662dba8a2b
8+
refs/heads/try2: 0c8a009dc993e8bad278bacba425f3daf3edfa96
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/src/libcore/libc.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@
1313
* * ISO 9945:2001 / IEEE 1003.1-2001 ('POSIX:2001', 'SUSv3').
1414
* * ISO 9945:2008 / IEEE 1003.1-2008 ('POSIX:2008', 'SUSv4').
1515
*
16+
* Note that any reference to the 1996 revision of POSIX, or any revs
17+
* between 1990 (when '88 was approved at ISO) and 2001 (when the next
18+
* actual revision-revision happened), are merely additions of other
19+
* chapters (1b and 1c) outside the core interfaces.
20+
*
1621
* Despite having several names each, these are *reasonably* coherent
1722
* point-in-time, list-of-definition sorts of specs. You can get each under a
1823
* variety of names but will wind up with the same definition in each case.
1924
*
25+
* See standards(7) in linux-manpages for more details.
26+
*
2027
* Our interface to these libraries is complicated by the non-universality of
2128
* conformance to any of them. About the only thing universally supported is
2229
* the first (C95), beyond that definitions quickly become absent on various
@@ -124,7 +131,7 @@ pub use open, creat;
124131
pub use access, chdir, close, dup, dup2, execv, execve, execvp, getcwd,
125132
getpid, isatty, lseek, pipe, read, rmdir, unlink, write;
126133

127-
pub use fstat, lstat, stat;
134+
pub use fstat, stat;
128135

129136

130137
mod types {
@@ -392,6 +399,8 @@ mod types {
392399
pub mod os {
393400
pub mod common {
394401
pub mod posix01 {
402+
// Note: this is the struct called stat64 in win32. Not stat,
403+
// nor stati64.
395404
pub struct stat {
396405
st_dev: dev_t,
397406
st_ino: ino_t,
@@ -403,7 +412,7 @@ mod types {
403412
st_size: int64_t,
404413
st_atime: time64_t,
405414
st_mtime: time64_t,
406-
st_c_time: time64_t,
415+
st_ctime: time64_t,
407416
}
408417
}
409418
}
@@ -479,6 +488,8 @@ mod types {
479488
pub type PBOOL = *mut BOOL;
480489
pub type WCHAR = wchar_t;
481490
pub type WORD = u16;
491+
492+
pub type time64_t = i64;
482493
}
483494
}
484495
}
@@ -1025,6 +1036,12 @@ pub mod funcs {
10251036

10261037
#[link_name = "_mkdir"]
10271038
fn mkdir(path: *c_char) -> c_int;
1039+
1040+
#[link_name = "_fstat64"]
1041+
fn fstat(fildes: c_int, buf: *mut stat) -> c_int;
1042+
1043+
#[link_name = "_stat64"]
1044+
fn stat(path: *c_char, buf: *mut stat) -> c_int;
10281045
}
10291046

10301047
#[nolink]

branches/try2/src/libcore/path.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ mod stat {
190190
}
191191
}
192192

193-
#[cfg(target_os = "windows")]
193+
#[cfg(target_os = "win32")]
194194
mod stat {
195195
pub mod arch {
196196
pub fn default_stat() -> libc::stat {
@@ -222,6 +222,7 @@ impl Path {
222222
}
223223
}
224224

225+
#[cfg(unix)]
225226
fn lstat(&self) -> Option<libc::stat> {
226227
do str::as_c_str(self.to_str()) |buf| {
227228
let mut st = stat::arch::default_stat();

0 commit comments

Comments
 (0)