Skip to content

Commit 218ceba

Browse files
committed
Auto merge of #1363 - gnzlbg:fix_locale_t, r=gnzlbg
Fix locale_t in unix and fuchsia. Closes #1055.
2 parents 9ff0a74 + 5e2b0d8 commit 218ceba

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/fuchsia/mod.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ pub type c_ulonglong = u64;
2727
pub type intmax_t = i64;
2828
pub type uintmax_t = u64;
2929

30+
pub type locale_t = *mut ::c_void;
31+
3032
pub type size_t = usize;
3133
pub type ptrdiff_t = isize;
3234
pub type intptr_t = isize;
@@ -110,12 +112,7 @@ impl ::Copy for DIR {}
110112
impl ::Clone for DIR {
111113
fn clone(&self) -> DIR { *self }
112114
}
113-
#[cfg_attr(feature = "extra_traits", derive(Debug))]
114-
pub enum locale_t {}
115-
impl ::Copy for locale_t {}
116-
impl ::Clone for locale_t {
117-
fn clone(&self) -> locale_t { *self }
118-
}
115+
119116
#[cfg_attr(feature = "extra_traits", derive(Debug))]
120117
pub enum fpos64_t {} // TODO: fill this out with a struct
121118
impl ::Copy for fpos64_t {}

src/unix/mod.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ impl ::Copy for DIR {}
4545
impl ::Clone for DIR {
4646
fn clone(&self) -> DIR { *self }
4747
}
48-
#[cfg_attr(feature = "extra_traits", derive(Debug))]
49-
pub enum locale_t {}
50-
impl ::Copy for locale_t {}
51-
impl ::Clone for locale_t {
52-
fn clone(&self) -> locale_t { *self }
53-
}
48+
pub type locale_t = *mut :: c_void;
5449

5550
s! {
5651
pub struct group {

0 commit comments

Comments
 (0)