about summary refs log tree commit diff
path: root/src/libstd/libc.rs
diff options
context:
space:
mode:
authorreedlepee <reedlepee123@gmail.com>2013-10-20 06:03:09 +0530
committerreedlepee <reedlepee123@gmail.com>2013-10-23 01:10:50 +0530
commit0ada7c7ffe453b9df849996f8dca0b8d0f2d9e62 (patch)
tree6f1dc6e0c50e81caacfcb5cef1a9543d9442e87e /src/libstd/libc.rs
parentdadb6f0cd9fa7e4b402a0107358acb34002d4895 (diff)
Making fields in std and extra : private #4386
Diffstat (limited to 'src/libstd/libc.rs')
-rw-r--r--src/libstd/libc.rs376
1 files changed, 197 insertions, 179 deletions
diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs
index d4df0e826f6..67d64596460 100644
--- a/src/libstd/libc.rs
+++ b/src/libstd/libc.rs
@@ -226,15 +226,16 @@ pub mod types {
                 use libc::types::common::c95::{c_void};
                 use libc::types::os::arch::c95::{c_char, size_t};
                 pub struct glob_t {
-                    gl_pathc: size_t,
-                    gl_pathv: **c_char,
-                    gl_offs:  size_t,
-
-                    __unused1: *c_void,
-                    __unused2: *c_void,
-                    __unused3: *c_void,
-                    __unused4: *c_void,
-                    __unused5: *c_void,
+                    // all made by reedlepee
+                    priv gl_pathc: size_t,
+                    priv gl_pathv: **c_char,
+                    priv gl_offs:  size_t,
+
+                    priv __unused1: *c_void,
+                    priv __unused2: *c_void,
+                    priv __unused3: *c_void,
+                     __unused4: *c_void,
+                     __unused5: *c_void,
                 }
             }
         }
@@ -304,15 +305,16 @@ pub mod types {
                 pub type blkcnt_t = i32;
 
                 pub struct stat {
+                    // all made by reedlepee
                     st_dev: dev_t,
-                    __pad1: c_short,
+                     __pad1: c_short,
                     st_ino: ino_t,
                     st_mode: mode_t,
                     st_nlink: nlink_t,
-                    st_uid: uid_t,
+                     st_uid: uid_t,
                     st_gid: gid_t,
-                    st_rdev: dev_t,
-                    __pad2: c_short,
+                     st_rdev: dev_t,
+                     __pad2: c_short,
                     st_size: off_t,
                     st_blksize: blksize_t,
                     st_blocks: blkcnt_t,
@@ -323,7 +325,7 @@ pub mod types {
                     st_ctime: time_t,
                     st_ctime_nsec: c_long,
                     __unused4: c_long,
-                    __unused5: c_long,
+                     __unused5: c_long,
                 }
             }
             #[cfg(target_arch = "arm")]
@@ -337,15 +339,16 @@ pub mod types {
                 pub type blkcnt_t = u32;
 
                 pub struct stat {
+                    // all made priv by reedlepee
                     st_dev: c_ulonglong,
-                    __pad0: [c_uchar, ..4],
-                    __st_ino: ino_t,
+                    priv __pad0: [c_uchar, ..4],
+                    priv __st_ino: ino_t,
                     st_mode: c_uint,
                     st_nlink: c_uint,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: c_ulonglong,
-                    __pad3: [c_uchar, ..4],
+                     st_uid: uid_t,
+                     st_gid: gid_t,
+                     st_rdev: c_ulonglong,
+                    priv __pad3: [c_uchar, ..4],
                     st_size: c_longlong,
                     st_blksize: blksize_t,
                     st_blocks: c_ulonglong,
@@ -353,8 +356,8 @@ pub mod types {
                     st_atime_nsec: c_ulong,
                     st_mtime: time_t,
                     st_mtime_nsec: c_ulong,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_ulong,
+                     st_ctime: time_t,
+                     st_ctime_nsec: c_ulong,
                     st_ino: c_ulonglong
                 }
             }
@@ -370,17 +373,18 @@ pub mod types {
                 pub type blkcnt_t = i32;
 
                 pub struct stat {
+                    /// all made priv by reedlepee
                     st_dev: c_ulong,
-                    st_pad1: [c_long, ..3],
+                    priv st_pad1: [c_long, ..3],
                     st_ino: ino_t,
                     st_mode: mode_t,
                     st_nlink: nlink_t,
                     st_uid: uid_t,
                     st_gid: gid_t,
                     st_rdev: c_ulong,
-                    st_pad2: [c_long, ..2],
+                    priv st_pad2: [c_long, ..2],
                     st_size: off_t,
-                    st_pad3: c_long,
+                    priv st_pad3: c_long,
                     st_atime: time_t,
                     st_atime_nsec: c_long,
                     st_mtime: time_t,
@@ -389,7 +393,7 @@ pub mod types {
                     st_ctime_nsec: c_long,
                     st_blksize: blksize_t,
                     st_blocks: blkcnt_t,
-                    st_pad5: [c_long, ..14],
+                    priv st_pad5: [c_long, ..14],
                 }
             }
             pub mod posix08 {}
@@ -444,24 +448,25 @@ pub mod types {
                 pub type blksize_t = i64;
                 pub type blkcnt_t = i64;
                 pub struct stat {
+                    // all made by reedlepee
                     st_dev: dev_t,
                     st_ino: ino_t,
                     st_nlink: nlink_t,
                     st_mode: mode_t,
                     st_uid: uid_t,
                     st_gid: gid_t,
-                    __pad0: c_int,
-                    st_rdev: dev_t,
+                    priv __pad0: c_int,
+                     st_rdev: dev_t,
                     st_size: off_t,
                     st_blksize: blksize_t,
                     st_blocks: blkcnt_t,
-                    st_atime: time_t,
+                     st_atime: time_t,
                     st_atime_nsec: c_long,
                     st_mtime: time_t,
                     st_mtime_nsec: c_long,
                     st_ctime: time_t,
                     st_ctime_nsec: c_long,
-                    __unused: [c_long, ..3],
+                    priv __unused: [c_long, ..3],
                 }
             }
             pub mod posix08 {
@@ -480,19 +485,20 @@ pub mod types {
                 use libc::types::common::c95::{c_void};
                 use libc::types::os::arch::c95::{c_char, c_int, size_t};
                 pub struct glob_t {
-                    gl_pathc:  size_t,
-                    __unused1: size_t,
-                    gl_offs:   size_t,
-                    __unused2: c_int,
-                    gl_pathv:  **c_char,
-
-                    __unused3: *c_void,
-
-                    __unused4: *c_void,
-                    __unused5: *c_void,
-                    __unused6: *c_void,
-                    __unused7: *c_void,
-                    __unused8: *c_void,
+                    // all made priv by reedlepee
+                    priv gl_pathc:  size_t,
+                    priv __unused1: size_t,
+                    priv gl_offs:   size_t,
+                    priv __unused2: c_int,
+                    priv gl_pathv:  **c_char,
+
+                    priv __unused3: *c_void,
+
+                     __unused4: *c_void,
+                     __unused5: *c_void,
+                    priv __unused6: *c_void,
+                    priv __unused7: *c_void,
+                    priv __unused8: *c_void,
                 }
             }
         }
@@ -546,13 +552,14 @@ pub mod types {
                 pub type blkcnt_t = i64;
                 pub type fflags_t = u32;
                 pub struct stat {
+                    // all made by reedlepee
                     st_dev: dev_t,
                     st_ino: ino_t,
                     st_mode: mode_t,
                     st_nlink: nlink_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: dev_t,
+                     st_uid: uid_t,
+                     st_gid: gid_t,
+                     st_rdev: dev_t,
                     st_atime: time_t,
                     st_atime_nsec: c_long,
                     st_mtime: time_t,
@@ -562,12 +569,12 @@ pub mod types {
                     st_size: off_t,
                     st_blocks: blkcnt_t,
                     st_blksize: blksize_t,
-                    st_flags: fflags_t,
-                    st_gen: uint32_t,
-                    st_lspare: int32_t,
-                    st_birthtime: time_t,
-                    st_birthtime_nsec: c_long,
-                    __unused: [uint8_t, ..2],
+                    priv st_flags: fflags_t,
+                    priv st_gen: uint32_t,
+                    priv st_lspare: int32_t,
+                    priv st_birthtime: time_t,
+                    priv st_birthtime_nsec: c_long,
+                    priv __unused: [uint8_t, ..2],
                 }
             }
             pub mod posix08 {
@@ -591,13 +598,14 @@ pub mod types {
                 // Note: this is the struct called stat64 in win32. Not stat,
                 // nor stati64.
                 pub struct stat {
+                    // all made privv by reedlepee
                     st_dev: dev_t,
                     st_ino: ino_t,
                     st_mode: mode_t,
                     st_nlink: c_short,
-                    st_uid: c_short,
+                     st_uid: c_short,
                     st_gid: c_short,
-                    st_rdev: dev_t,
+                     st_rdev: dev_t,
                     st_size: int64,
                     st_atime: time64_t,
                     st_mtime: time64_t,
@@ -697,47 +705,49 @@ pub mod types {
                 pub type int64 = i64;
 
                 pub struct STARTUPINFO {
-                    cb: DWORD,
-                    lpReserved: LPTSTR,
-                    lpDesktop: LPTSTR,
-                    lpTitle: LPTSTR,
-                    dwX: DWORD,
-                    dwY: DWORD,
-                    dwXSize: DWORD,
-                    dwYSize: DWORD,
-                    dwXCountChars: DWORD,
-                    dwYCountCharts: DWORD,
-                    dwFillAttribute: DWORD,
-                    dwFlags: DWORD,
-                    wShowWindow: WORD,
-                    cbReserved2: WORD,
-                    lpReserved2: LPBYTE,
-                    hStdInput: HANDLE,
-                    hStdOutput: HANDLE,
-                    hStdError: HANDLE
+                    // all made by reedlepee
+                    priv cb: DWORD,
+                    priv lpReserved: LPTSTR,
+                    priv lpDesktop: LPTSTR,
+                    priv lpTitle: LPTSTR,
+                    priv dwX: DWORD,
+                    priv dwY: DWORD,
+                    priv dwXSize: DWORD,
+                    priv dwYSize: DWORD,
+                    priv dwXCountChars: DWORD,
+                    priv dwYCountCharts: DWORD,
+                    priv dwFillAttribute: DWORD,
+                    priv dwFlags: DWORD,
+                    priv wShowWindow: WORD,
+                    priv cbReserved2: WORD,
+                    priv lpReserved2: LPBYTE,
+                    priv hStdInput: HANDLE,
+                    priv hStdOutput: HANDLE,
+                    priv hStdError: HANDLE
                 }
                 pub type LPSTARTUPINFO = *mut STARTUPINFO;
-
                 pub struct PROCESS_INFORMATION {
-                    hProcess: HANDLE,
-                    hThread: HANDLE,
-                    dwProcessId: DWORD,
-                    dwThreadId: DWORD
+                    // all made by reedlepee
+                    priv hProcess: HANDLE,
+                    priv hThread: HANDLE,
+                    priv dwProcessId: DWORD,
+                    priv dwThreadId: DWORD
                 }
                 pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
 
                 pub struct SYSTEM_INFO {
-                    wProcessorArchitecture: WORD,
-                    wReserved: WORD,
-                    dwPageSize: DWORD,
-                    lpMinimumApplicationAddress: LPVOID,
-                    lpMaximumApplicationAddress: LPVOID,
-                    dwActiveProcessorMask: DWORD,
-                    dwNumberOfProcessors: DWORD,
-                    dwProcessorType: DWORD,
-                    dwAllocationGranularity: DWORD,
-                    wProcessorLevel: WORD,
-                    wProcessorRevision: WORD
+                    // all made by reedlepee
+                    priv wProcessorArchitecture: WORD,
+                    priv wReserved: WORD,
+                    priv dwPageSize: DWORD,
+                    priv lpMinimumApplicationAddress: LPVOID,
+                    priv lpMaximumApplicationAddress: LPVOID,
+                    priv dwActiveProcessorMask: DWORD,
+                    priv dwNumberOfProcessors: DWORD,
+                    priv dwProcessorType: DWORD,
+                    priv dwAllocationGranularity: DWORD,
+                    priv wProcessorLevel: WORD,
+                    priv wProcessorRevision: WORD
                 }
                 pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
 
@@ -760,13 +770,14 @@ pub mod types {
                 }
 
                 pub struct MEMORY_BASIC_INFORMATION {
-                    BaseAddress: LPVOID,
-                    AllocationBase: LPVOID,
-                    AllocationProtect: DWORD,
-                    RegionSize: SIZE_T,
-                    State: DWORD,
-                    Protect: DWORD,
-                    Type: DWORD
+                    // all made by reedlepee
+                    priv BaseAddress: LPVOID,
+                    priv AllocationBase: LPVOID,
+                    priv AllocationProtect: DWORD,
+                    priv RegionSize: SIZE_T,
+                    priv State: DWORD,
+                    priv Protect: DWORD,
+                    priv Type: DWORD
                 }
                 pub type LPMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION;
             }
@@ -863,47 +874,50 @@ pub mod types {
                 pub type int64 = i64;
 
                 pub struct STARTUPINFO {
-                    cb: DWORD,
-                    lpReserved: LPTSTR,
-                    lpDesktop: LPTSTR,
-                    lpTitle: LPTSTR,
-                    dwX: DWORD,
-                    dwY: DWORD,
-                    dwXSize: DWORD,
-                    dwYSize: DWORD,
-                    dwXCountChars: DWORD,
-                    dwYCountCharts: DWORD,
-                    dwFillAttribute: DWORD,
-                    dwFlags: DWORD,
-                    wShowWindow: WORD,
-                    cbReserved2: WORD,
-                    lpReserved2: LPBYTE,
-                    hStdInput: HANDLE,
-                    hStdOutput: HANDLE,
-                    hStdError: HANDLE
+                     // all made by reedlepee
+                     priv cb: DWORD,
+                     priv lpReserved: LPTSTR,
+                     priv lpDesktop: LPTSTR,
+                     priv lpTitle: LPTSTR,
+                     priv dwX: DWORD,
+                     priv dwY: DWORD,
+                     priv dwXSize: DWORD,
+                     priv dwYSize: DWORD,
+                     priv dwXCountChars: DWORD,
+                     priv dwYCountCharts: DWORD,
+                     priv dwFillAttribute: DWORD,
+                     priv dwFlags: DWORD,
+                     priv wShowWindow: WORD,
+                     priv cbReserved2: WORD,
+                     priv lpReserved2: LPBYTE,
+                     priv hStdInput: HANDLE,
+                     priv hStdOutput: HANDLE,
+                     priv hStdError: HANDLE
                 }
                 pub type LPSTARTUPINFO = *mut STARTUPINFO;
 
                 pub struct PROCESS_INFORMATION {
-                    hProcess: HANDLE,
-                    hThread: HANDLE,
-                    dwProcessId: DWORD,
-                    dwThreadId: DWORD
+                    // all made by reedlepee
+                    priv hProcess: HANDLE,
+                    priv hThread: HANDLE,
+                    priv dwProcessId: DWORD,
+                    priv dwThreadId: DWORD
                 }
                 pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
 
                 pub struct SYSTEM_INFO {
-                    wProcessorArchitecture: WORD,
-                    wReserved: WORD,
-                    dwPageSize: DWORD,
-                    lpMinimumApplicationAddress: LPVOID,
-                    lpMaximumApplicationAddress: LPVOID,
-                    dwActiveProcessorMask: DWORD,
-                    dwNumberOfProcessors: DWORD,
-                    dwProcessorType: DWORD,
-                    dwAllocationGranularity: DWORD,
-                    wProcessorLevel: WORD,
-                    wProcessorRevision: WORD
+                     // all made by reedlepee
+                     priv wProcessorArchitecture: WORD,
+                     priv wReserved: WORD,
+                     priv dwPageSize: DWORD,
+                     priv lpMinimumApplicationAddress: LPVOID,
+                     priv lpMaximumApplicationAddress: LPVOID,
+                     priv dwActiveProcessorMask: DWORD,
+                     priv dwNumberOfProcessors: DWORD,
+                     priv dwProcessorType: DWORD,
+                     priv dwAllocationGranularity: DWORD,
+                     priv wProcessorLevel: WORD,
+                     priv wProcessorRevision: WORD
                 }
                 pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
 
@@ -926,13 +940,14 @@ pub mod types {
                 }
 
                 pub struct MEMORY_BASIC_INFORMATION {
-                    BaseAddress: LPVOID,
-                    AllocationBase: LPVOID,
-                    AllocationProtect: DWORD,
-                    RegionSize: SIZE_T,
-                    State: DWORD,
-                    Protect: DWORD,
-                    Type: DWORD
+                     // all made by reedlepee
+                     priv BaseAddress: LPVOID,
+                     priv AllocationBase: LPVOID,
+                     priv AllocationProtect: DWORD,
+                     priv RegionSize: SIZE_T,
+                     priv State: DWORD,
+                     priv Protect: DWORD,
+                     priv Type: DWORD
                 }
                 pub type LPMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION;
             }
@@ -946,19 +961,20 @@ pub mod types {
                 use libc::types::common::c95::{c_void};
                 use libc::types::os::arch::c95::{c_char, c_int, size_t};
                 pub struct glob_t {
-                    gl_pathc:  size_t,
-                    __unused1: c_int,
-                    gl_offs:   size_t,
-                    __unused2: c_int,
-                    gl_pathv:  **c_char,
-
-                    __unused3: *c_void,
-
-                    __unused4: *c_void,
-                    __unused5: *c_void,
-                    __unused6: *c_void,
-                    __unused7: *c_void,
-                    __unused8: *c_void,
+                    // all made by reedlepee
+                    priv gl_pathc:  size_t,
+                    priv __unused1: c_int,
+                    priv gl_offs:   size_t,
+                    priv __unused2: c_int,
+                    priv gl_pathv:  **c_char,
+
+                    priv __unused3: *c_void,
+
+                     __unused4: *c_void,
+                     __unused5: *c_void,
+                    priv __unused6: *c_void,
+                    priv __unused7: *c_void,
+                    priv __unused8: *c_void,
                 }
             }
         }
@@ -1011,28 +1027,29 @@ pub mod types {
                 pub type blkcnt_t = i32;
 
                 pub struct stat {
+                    // all made by reedlepee
                     st_dev: dev_t,
                     st_mode: mode_t,
                     st_nlink: nlink_t,
                     st_ino: ino_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: dev_t,
+                     st_uid: uid_t,
+                     st_gid: gid_t,
+                     st_rdev: dev_t,
                     st_atime: time_t,
                     st_atime_nsec: c_long,
                     st_mtime: time_t,
                     st_mtime_nsec: c_long,
                     st_ctime: time_t,
                     st_ctime_nsec: c_long,
-                    st_birthtime: time_t,
-                    st_birthtime_nsec: c_long,
+                    priv st_birthtime: time_t,
+                    priv st_birthtime_nsec: c_long,
                     st_size: off_t,
                     st_blocks: blkcnt_t,
                     st_blksize: blksize_t,
-                    st_flags: uint32_t,
-                    st_gen: uint32_t,
-                    st_lspare: int32_t,
-                    st_qspare: [int64_t, ..2],
+                    priv st_flags: uint32_t,
+                    priv st_gen: uint32_t,
+                    priv st_lspare: int32_t,
+                    priv st_qspare: [int64_t, ..2],
                 }
             }
             pub mod posix08 {
@@ -1092,28 +1109,29 @@ pub mod types {
                 pub type blkcnt_t = i32;
 
                 pub struct stat {
-                    st_dev: dev_t,
-                    st_mode: mode_t,
-                    st_nlink: nlink_t,
-                    st_ino: ino_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: dev_t,
-                    st_atime: time_t,
-                    st_atime_nsec: c_long,
-                    st_mtime: time_t,
-                    st_mtime_nsec: c_long,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_long,
-                    st_birthtime: time_t,
-                    st_birthtime_nsec: c_long,
-                    st_size: off_t,
-                    st_blocks: blkcnt_t,
-                    st_blksize: blksize_t,
-                    st_flags: uint32_t,
-                    st_gen: uint32_t,
-                    st_lspare: int32_t,
-                    st_qspare: [int64_t, ..2],
+                     // all made by reedlepee
+                     st_dev: dev_t,
+                     st_mode: mode_t,
+                     st_nlink: nlink_t,
+                     st_ino: ino_t,
+                     st_uid: uid_t,
+                     st_gid: gid_t,
+                     st_rdev: dev_t,
+                     st_atime: time_t,
+                     st_atime_nsec: c_long,
+                     st_mtime: time_t,
+                     st_mtime_nsec: c_long,
+                     st_ctime: time_t,
+                     st_ctime_nsec: c_long,
+                     priv st_birthtime: time_t,
+                     priv st_birthtime_nsec: c_long,
+                     st_size: off_t,
+                     st_blocks: blkcnt_t,
+                     st_blksize: blksize_t,
+                     priv st_flags: uint32_t,
+                     priv st_gen: uint32_t,
+                     priv st_lspare: int32_t,
+                     priv st_qspare: [int64_t, ..2],
                 }
             }
             pub mod posix08 {