summaryrefslogtreecommitdiff
path: root/libc/src/windows/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/windows/mod.rs')
-rw-r--r--libc/src/windows/mod.rs23
1 files changed, 20 insertions, 3 deletions
diff --git a/libc/src/windows/mod.rs b/libc/src/windows/mod.rs
index 4bea459..70ca675 100644
--- a/libc/src/windows/mod.rs
+++ b/libc/src/windows/mod.rs
@@ -47,7 +47,12 @@ cfg_if! {
pub type off_t = i32;
pub type dev_t = u32;
pub type ino_t = u16;
+#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum timezone {}
+impl ::Copy for timezone {}
+impl ::Clone for timezone {
+ fn clone(&self) -> timezone { *self }
+}
pub type time64_t = i64;
pub type SOCKET = ::uintptr_t;
@@ -201,8 +206,18 @@ pub const SIG_ERR: ::c_int = -1;
#[link(name = "libcmt", cfg(target_feature = "crt-static"))]
extern {}
+#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum FILE {}
+impl ::Copy for FILE {}
+impl ::Clone for FILE {
+ fn clone(&self) -> FILE { *self }
+}
+#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos_t {} // TODO: fill this out with a struct
+impl ::Copy for fpos_t {}
+impl ::Clone for fpos_t {
+ fn clone(&self) -> fpos_t { *self }
+}
extern {
pub fn isalnum(c: c_int) -> c_int;
@@ -419,13 +434,15 @@ extern "system" {
}
cfg_if! {
- if #[cfg(core_cvoid)] {
- pub use core::ffi::c_void;
+ if #[cfg(libc_core_cvoid)] {
+ pub use ::ffi::c_void;
} else {
// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help
// enable more optimization opportunities around it recognizing things
// like malloc/free.
#[repr(u8)]
+ #[allow(missing_copy_implementations)]
+ #[allow(missing_debug_implementations)]
pub enum c_void {
// Two dummy variants so the #[repr] attribute can be used.
#[doc(hidden)]
@@ -446,4 +463,4 @@ cfg_if! {
} else {
// Unknown target_env
}
-} \ No newline at end of file
+}