ladybird/Userland/Libraries/LibC/bits/wchar_size.h
Tim Schumacher cdca6fc113 LibC: Make wchar size definitions available from stdint.h
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.
2022-03-29 15:19:39 +02:00

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