|
8 | 8 | // option. This file may not be copied, modified, or distributed
|
9 | 9 | // except according to those terms.
|
10 | 10 |
|
11 |
| -#[feature(globs)]; |
12 |
| -#[crate_id = "libc#0.10-pre"]; |
13 |
| -#[experimental]; |
| 11 | +#![feature(globs)] |
| 12 | +#![crate_id = "libc#0.10-pre"] |
| 13 | +#![experimental] |
| 14 | +#![no_std] // we don't need std, and we can't have std, since it doesn't exist |
| 15 | + // yet. std depends on us. |
| 16 | +#![crate_type = "rlib"] |
| 17 | +#![crate_type = "dylib"] |
14 | 18 |
|
15 | 19 | /*!
|
16 | 20 | * Bindings for the C standard library and other platform libraries
|
17 | 21 | *
|
18 |
| -* This module contains bindings to the C standard library, |
19 |
| -* organized into modules by their defining standard. |
20 |
| -* Additionally, it contains some assorted platform-specific definitions. |
21 |
| -* For convenience, most functions and types are reexported from `libc`, |
22 |
| -* so `pub use std::*` will import the available |
23 |
| -* C bindings as appropriate for the target platform. The exact |
24 |
| -* set of functions available are platform specific. |
| 22 | +* **NOTE:** These are *architecture and libc* specific. On Linux, these |
| 23 | +* bindings are only correct for glibc. |
25 | 24 | *
|
26 |
| -* *Note* Because these definitions are platform-specific, some may not appear in |
27 |
| -* the generated documentation. |
| 25 | +* This module contains bindings to the C standard library, organized into |
| 26 | +* modules by their defining standard. Additionally, it contains some assorted |
| 27 | +* platform-specific definitions. For convenience, most functions and types |
| 28 | +* are reexported, so `use libc::*` will import the available C bindings as |
| 29 | +* appropriate for the target platform. The exact set of functions available |
| 30 | +* are platform specific. |
28 | 31 | *
|
29 |
| -* We consider the following specs reasonably normative with respect |
30 |
| -* to interoperating with the C standard library (libc/msvcrt): |
| 32 | +* *Note:* Because these definitions are platform-specific, some may not appear |
| 33 | +* in the generated documentation. |
| 34 | +* |
| 35 | +* We consider the following specs reasonably normative with respect to |
| 36 | +* interoperating with the C standard library (libc/msvcrt): |
31 | 37 | *
|
32 | 38 | * * ISO 9899:1990 ('C95', 'ANSI C', 'Standard C'), NA1, 1995.
|
33 | 39 | * * ISO 9899:1999 ('C99' or 'C9x').
|
34 | 40 | * * ISO 9945:1988 / IEEE 1003.1-1988 ('POSIX.1').
|
35 | 41 | * * ISO 9945:2001 / IEEE 1003.1-2001 ('POSIX:2001', 'SUSv3').
|
36 | 42 | * * ISO 9945:2008 / IEEE 1003.1-2008 ('POSIX:2008', 'SUSv4').
|
37 | 43 | *
|
38 |
| -* Note that any reference to the 1996 revision of POSIX, or any revs |
39 |
| -* between 1990 (when '88 was approved at ISO) and 2001 (when the next |
40 |
| -* actual revision-revision happened), are merely additions of other |
41 |
| -* chapters (1b and 1c) outside the core interfaces. |
| 44 | +* Note that any reference to the 1996 revision of POSIX, or any revs between |
| 45 | +* 1990 (when '88 was approved at ISO) and 2001 (when the next actual |
| 46 | +* revision-revision happened), are merely additions of other chapters (1b and |
| 47 | +* 1c) outside the core interfaces. |
42 | 48 | *
|
43 | 49 | * Despite having several names each, these are *reasonably* coherent
|
44 | 50 | * point-in-time, list-of-definition sorts of specs. You can get each under a
|
|
55 | 61 | * sanity while editing, filling-in-details and eliminating duplication) into
|
56 | 62 | * definitions common-to-all (held in modules named c95, c99, posix88, posix01
|
57 | 63 | * and posix08) and definitions that appear only on *some* platforms (named
|
58 |
| -* 'extra'). This would be things like significant OSX foundation kit, or |
59 |
| -* win32 library kernel32.dll, or various fancy glibc, linux or BSD |
60 |
| -* extensions. |
| 64 | +* 'extra'). This would be things like significant OSX foundation kit, or win32 |
| 65 | +* library kernel32.dll, or various fancy glibc, linux or BSD extensions. |
61 | 66 | *
|
62 | 67 | * In addition to the per-platform 'extra' modules, we define a module of
|
63 | 68 | * 'common BSD' libc routines that never quite made it into POSIX but show up
|
64 |
| -* in multiple derived systems. This is the 4.4BSD r2 / 1995 release, the |
65 |
| -* final one from Berkeley after the lawsuits died down and the CSRG |
66 |
| -* dissolved. |
| 69 | +* in multiple derived systems. This is the 4.4BSD r2 / 1995 release, the final |
| 70 | +* one from Berkeley after the lawsuits died down and the CSRG dissolved. |
67 | 71 | */
|
68 | 72 |
|
69 | 73 | #![allow(non_camel_case_types)]
|
@@ -997,7 +1001,6 @@ pub mod types {
|
997 | 1001 | pub mod bsd44 {
|
998 | 1002 | }
|
999 | 1003 | pub mod extra {
|
1000 |
| - use ptr; |
1001 | 1004 | use consts::os::extra::{MAX_PROTOCOL_CHAIN,
|
1002 | 1005 | WSAPROTOCOL_LEN};
|
1003 | 1006 | use types::common::c95::c_void;
|
@@ -1102,24 +1105,6 @@ pub mod types {
|
1102 | 1105 | }
|
1103 | 1106 | pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
|
1104 | 1107 |
|
1105 |
| - impl SYSTEM_INFO { |
1106 |
| - pub fn new() -> SYSTEM_INFO { |
1107 |
| - SYSTEM_INFO { |
1108 |
| - wProcessorArchitecture: 0, |
1109 |
| - wReserved: 0, |
1110 |
| - dwPageSize: 0, |
1111 |
| - lpMinimumApplicationAddress: ptr::mut_null(), |
1112 |
| - lpMaximumApplicationAddress: ptr::mut_null(), |
1113 |
| - dwActiveProcessorMask: 0, |
1114 |
| - dwNumberOfProcessors: 0, |
1115 |
| - dwProcessorType: 0, |
1116 |
| - dwAllocationGranularity: 0, |
1117 |
| - wProcessorLevel: 0, |
1118 |
| - wProcessorRevision: 0 |
1119 |
| - } |
1120 |
| - } |
1121 |
| - } |
1122 |
| - |
1123 | 1108 | pub struct MEMORY_BASIC_INFORMATION {
|
1124 | 1109 | pub BaseAddress: LPVOID,
|
1125 | 1110 | pub AllocationBase: LPVOID,
|
@@ -3901,12 +3886,11 @@ pub mod funcs {
|
3901 | 3886 | pub mod glob {
|
3902 | 3887 | use types::os::arch::c95::{c_char, c_int};
|
3903 | 3888 | use types::os::common::posix01::{glob_t};
|
3904 |
| - use Nullable; |
3905 | 3889 |
|
3906 | 3890 | extern {
|
3907 | 3891 | pub fn glob(pattern: *c_char,
|
3908 | 3892 | flags: c_int,
|
3909 |
| - errfunc: Nullable<extern "C" fn(epath: *c_char, errno: int) -> int>, |
| 3893 | + errfunc: ::Nullable<extern "C" fn(epath: *c_char, errno: int) -> int>, |
3910 | 3894 | pglob: *mut glob_t);
|
3911 | 3895 | pub fn globfree(pglob: *mut glob_t);
|
3912 | 3896 | }
|
|
0 commit comments