Skip to content

Commit

Permalink
Remove CHAR
Browse files Browse the repository at this point in the history
As with USHORT, keep using C types for BSD socket APIs.
  • Loading branch information
ChrisDenton committed Jul 15, 2024
1 parent 00a5b3b commit cd51de1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions std/src/sys/pal/windows/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pub use windows_sys::*;
pub type DWORD = c_ulong;
pub type WCHAR = u16;
pub type SIZE_T = usize;
pub type CHAR = c_char;
pub type ULONG = c_ulong;

pub type LPCVOID = *const c_void;
Expand Down Expand Up @@ -142,9 +141,9 @@ pub struct MOUNT_POINT_REPARSE_BUFFER {
#[repr(C)]
pub struct SOCKADDR_STORAGE_LH {
pub ss_family: ADDRESS_FAMILY,
pub __ss_pad1: [CHAR; 6],
pub __ss_pad1: [c_char; 6],
pub __ss_align: i64,
pub __ss_pad2: [CHAR; 112],
pub __ss_pad2: [c_char; 112],
}

#[repr(C)]
Expand All @@ -153,7 +152,7 @@ pub struct sockaddr_in {
pub sin_family: ADDRESS_FAMILY,
pub sin_port: c_ushort,
pub sin_addr: in_addr,
pub sin_zero: [CHAR; 8],
pub sin_zero: [c_char; 8],
}

#[repr(C)]
Expand Down

0 comments on commit cd51de1

Please sign in to comment.