
POSIX describes WCHAR_MIN and WCHAR_MAX in stdint.h(0P), while wchar.h(0P) only says "as described in stdint.h". As there isn't a trivial path of "may make visible", just move it to a shared header and include it from both files.
15 lines
325 B
C
15 lines
325 B
C
/*
|
|
* Copyright (c) 2022, Tim Schumacher <timschumi@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define WCHAR_MAX __WCHAR_MAX__
|
|
#ifdef __WCHAR_MIN__
|
|
# define WCHAR_MIN __WCHAR_MIN__
|
|
#else
|
|
// Note: This assumes that wchar_t is a signed type.
|
|
# define WCHAR_MIN (-WCHAR_MAX - 1)
|
|
#endif
|