13
13
* * ISO 9945:2001 / IEEE 1003.1-2001 ('POSIX:2001', 'SUSv3').
14
14
* * ISO 9945:2008 / IEEE 1003.1-2008 ('POSIX:2008', 'SUSv4').
15
15
*
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
+ *
16
21
* Despite having several names each, these are *reasonably* coherent
17
22
* point-in-time, list-of-definition sorts of specs. You can get each under a
18
23
* variety of names but will wind up with the same definition in each case.
19
24
*
25
+ * See standards(7) in linux-manpages for more details.
26
+ *
20
27
* Our interface to these libraries is complicated by the non-universality of
21
28
* conformance to any of them. About the only thing universally supported is
22
29
* the first (C95), beyond that definitions quickly become absent on various
@@ -124,7 +131,7 @@ pub use open, creat;
124
131
pub use access, chdir, close, dup, dup2, execv, execve, execvp, getcwd,
125
132
getpid, isatty, lseek, pipe, read, rmdir, unlink, write;
126
133
127
- pub use fstat, lstat , stat;
134
+ pub use fstat, stat;
128
135
129
136
130
137
mod types {
@@ -392,6 +399,8 @@ mod types {
392
399
pub mod os {
393
400
pub mod common {
394
401
pub mod posix01 {
402
+ // Note: this is the struct called stat64 in win32. Not stat,
403
+ // nor stati64.
395
404
pub struct stat {
396
405
st_dev : dev_t ,
397
406
st_ino : ino_t ,
@@ -403,7 +412,7 @@ mod types {
403
412
st_size : int64_t ,
404
413
st_atime : time64_t ,
405
414
st_mtime : time64_t ,
406
- st_c_time : time64_t ,
415
+ st_ctime : time64_t ,
407
416
}
408
417
}
409
418
}
@@ -479,6 +488,8 @@ mod types {
479
488
pub type PBOOL = * mut BOOL ;
480
489
pub type WCHAR = wchar_t ;
481
490
pub type WORD = u16 ;
491
+
492
+ pub type time64_t = i64 ;
482
493
}
483
494
}
484
495
}
@@ -1025,6 +1036,12 @@ pub mod funcs {
1025
1036
1026
1037
#[ link_name = "_mkdir" ]
1027
1038
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 ;
1028
1045
}
1029
1046
1030
1047
#[ nolink]
0 commit comments