From ae7cee26a661c02341332a200ddf03223a6fb362 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jeremy@system76.com> Date: Tue, 14 Sep 2021 20:36:23 -0600 Subject: [PATCH] Move wctype_t definition to wctype rust header --- include/bits/wctype.h | 1 - include/stddef.h | 1 - src/header/wctype/mod.rs | 2 ++ src/platform/types.rs | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/bits/wctype.h b/include/bits/wctype.h index 6dc4a0de5..fc2213533 100644 --- a/include/bits/wctype.h +++ b/include/bits/wctype.h @@ -2,7 +2,6 @@ #define _BITS_WCTYPE_H #include <stdint.h> -#define __need_wctype_t #define __need_wint_t #endif /* _BITS_WCTYPE_H */ diff --git a/include/stddef.h b/include/stddef.h index 895f5c449..b3973d4a7 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -12,7 +12,6 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; #ifndef __cplusplus typedef int32_t wchar_t; #endif /* #ifndef __cplusplus */ -typedef uint32_t wctype_t; typedef uint32_t wint_t; diff --git a/src/header/wctype/mod.rs b/src/header/wctype/mod.rs index 333742371..ca82b0a48 100644 --- a/src/header/wctype/mod.rs +++ b/src/header/wctype/mod.rs @@ -11,6 +11,8 @@ mod alpha; mod casecmp; mod punct; +pub type wctype_t = u32; + pub const WEOF: wint_t = 0xFFFF_FFFFu32; pub const WCTYPE_ALNUM: wctype_t = 1; diff --git a/src/platform/types.rs b/src/platform/types.rs index f48982939..f4a846aeb 100644 --- a/src/platform/types.rs +++ b/src/platform/types.rs @@ -45,7 +45,6 @@ pub type c_long = i64; pub type c_ulong = u64; pub type wchar_t = i32; -pub type wctype_t = u32; pub type wint_t = u32; pub type regoff_t = size_t; -- GitLab