xref: /freebsd/contrib/llvm-project/clang/lib/Headers/__stddef_wchar_t.h (revision 439352ac8257c8419cb4a662abb7f260f31f9932)
15f757f3fSDimitry Andric /*===---- __stddef_wchar.h - Definition of wchar_t -------------------------===
25f757f3fSDimitry Andric  *
35f757f3fSDimitry Andric  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45f757f3fSDimitry Andric  * See https://llvm.org/LICENSE.txt for license information.
55f757f3fSDimitry Andric  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
65f757f3fSDimitry Andric  *
75f757f3fSDimitry Andric  *===-----------------------------------------------------------------------===
85f757f3fSDimitry Andric  */
95f757f3fSDimitry Andric 
105f757f3fSDimitry Andric #if !defined(__cplusplus) || (defined(_MSC_VER) && !_NATIVE_WCHAR_T_DEFINED)
115f757f3fSDimitry Andric 
12*439352acSDimitry Andric /*
13*439352acSDimitry Andric  * When -fbuiltin-headers-in-system-modules is set this is a non-modular header
14*439352acSDimitry Andric  * and needs to behave as if it was textual.
15*439352acSDimitry Andric  */
16*439352acSDimitry Andric #if !defined(_WCHAR_T) ||                                                      \
17*439352acSDimitry Andric     (__has_feature(modules) && !__building_module(_Builtin_stddef))
185f757f3fSDimitry Andric #define _WCHAR_T
195f757f3fSDimitry Andric 
205f757f3fSDimitry Andric #ifdef _MSC_EXTENSIONS
215f757f3fSDimitry Andric #define _WCHAR_T_DEFINED
225f757f3fSDimitry Andric #endif
235f757f3fSDimitry Andric 
245f757f3fSDimitry Andric typedef __WCHAR_TYPE__ wchar_t;
255f757f3fSDimitry Andric 
265f757f3fSDimitry Andric #endif
275f757f3fSDimitry Andric 
285f757f3fSDimitry Andric #endif
29