nclude/sys/types: Move wint_t and wctype_t from wchar.h to types.h. This change is compatible as before since wchar.h include types.h indirectly. This fixes a compilation error with newlib's math.h: 'unknown type name wint_t'

This commit is contained in:
Xiang Xiao 2018-08-27 06:26:37 -06:00 committed by Gregory Nutt
parent e2e0911bc4
commit 894ca622e6
3 changed files with 24 additions and 13 deletions

View File

@ -45,6 +45,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* The <stddef.h> header shall define the following macros:
*
* NULL
@ -70,6 +71,7 @@
/****************************************************************************
* Type Definitions
****************************************************************************/
/* The <stddef.h> header shall define the following types:
*
* ptrdiff_t

View File

@ -204,6 +204,19 @@ typedef intptr_t ptrdiff_t;
typedef uint16_t wchar_t;
#endif
/* wint_t
* An integral type capable of storing any valid value of wchar_t, or WEOF.
*/
typedef int wint_t;
/* wctype_t
* A scalar type of a data object that can hold values which represent
* locale-specific character classification.
*/
typedef int wctype_t;
/* blkcnt_t and off_t are signed integer types.
*
* blkcnt_t is used for file block counts.

View File

@ -82,25 +82,21 @@
/****************************************************************************
* Type Definitions
****************************************************************************/
/* "The <wchar.h> header defines the following data types through
/* "The <wchar.h> header defines the following data types:
*
* wchar_t
* As described in <stddef.h>.
* Provided via <stddef.h>.
*
* wint_t
* An integral type capable of storing any valid value of wchar_t, or WEOF.
*/
typedef int wint_t;
/* wctype_t
* Provided via <sys/type.h>
*
* wctype_t
* A scalar type of a data object that can hold values which represent
* locale-specific character classification.
*/
typedef int wctype_t;
/* mbstate_t
* locale-specific character classification. Provided via <sys/type.h>
*
* mbstate_t
* An object type other than an array type that can hold the conversion
* state information necessary to convert between sequences of (possibly
* multibyte) characters and wide-characters. If a codeset is being used