History log of /llvm-project/libc/include/llvm-libc-macros/limits-macros.h (Results 1 – 10 of 10)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3
# b209eda6 07-Aug-2024 Joseph Huber <huberjn@outlook.com>

[libc] Define `MB_LEN_MAX` in `limits.h` (#102246)

Summary:
This is supposed to define the maximum bytes required to store a char in
any locale. There's some question about what this should be set t

[libc] Define `MB_LEN_MAX` in `limits.h` (#102246)

Summary:
This is supposed to define the maximum bytes required to store a char in
any locale. There's some question about what this should be set to. I
believe because the proposed solution for `locale.h` is to only support
the default locale, we should do what `musl` does and set it to `4`
which covers up to UTF-32.

Fixes https://github.com/llvm/llvm-project/issues/79358

show more ...


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 7f3c40a6 07-Jul-2024 Nhat Nguyen <nhat7203@gmail.com>

[libc] implement pathconf/fpathconf (#87165)


Revision tags: llvmorg-18.1.8
# d6bbe2e2 12-Jun-2024 Joseph Huber <huberjn@outlook.com>

[libc] Fix definition of `UINT_MAX` in limits.h (#95279)

Summary:
Currently we use `(~0U)` for this definition, however the ~ operator
returns a different sign, meaning that preprocessor checks agai

[libc] Fix definition of `UINT_MAX` in limits.h (#95279)

Summary:
Currently we use `(~0U)` for this definition, however the ~ operator
returns a different sign, meaning that preprocessor checks against this
value will fail. See https://godbolt.org/z/TrjaY1d8q where the
preprocessor thinks that it's not `0xffffffff` while the static
assertion thinks it is. This is because the latter does implicit
conversion but the preprocessor does not. This is now consistent with
other headers.

show more ...


Revision tags: llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1
# 330793c9 28-Feb-2024 Nick Desaulniers <nickdesaulniers@users.noreply.github.com>

[libc] fix clang-tidy llvm-header-guard warnings (#82679)


Towards the goal of getting `ninja libc-lint` back to green, fix the numerous
instances of:

warning: header guard does not follow pref

[libc] fix clang-tidy llvm-header-guard warnings (#82679)


Towards the goal of getting `ninja libc-lint` back to green, fix the numerous
instances of:

warning: header guard does not follow preferred style [llvm-header-guard]

This is because many of our header guards start with `__LLVM` rather than
`LLVM`.

To filter just these warnings:

$ ninja -k2000 libc-lint 2>&1 | grep llvm-header-guard

To automatically apply fixits:

$ find libc/src libc/include libc/test -name \*.h | \
xargs -n1 -I {} clang-tidy {} -p build/compile_commands.json \
-checks='-*,llvm-header-guard' --fix --quiet

Some manual cleanup is still necessary as headers that were missing header
guards outright will have them inserted before the license block (we prefer
them after).

show more ...


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1
# e9355b1b 25-Jan-2024 lntue <35648136+lntue@users.noreply.github.com>

[libc] Use __SIZEOF_LONG__ to define LONG_WIDTH instead of sizeof(long). (#79391)

The standard requires `limits.h` constants to be used in preprocessors.
So we use `__SIZEOF_LONG__` instead of `size

[libc] Use __SIZEOF_LONG__ to define LONG_WIDTH instead of sizeof(long). (#79391)

The standard requires `limits.h` constants to be used in preprocessors.
So we use `__SIZEOF_LONG__` instead of `sizeof(long)` to define
`LONG_WIDTH`. The macro `__SIZEOF_LONG__` seems to be available on both
clang and gcc since at least version 9.

show more ...


# 3a92b20c 24-Jan-2024 lntue <35648136+lntue@users.noreply.github.com>

[libc] Add backup definition for LONG_WIDTH in limits-macros.h. (#79375)


# 72ce6294 24-Jan-2024 lntue <35648136+lntue@users.noreply.github.com>

[libc] Add C23 limits.h header. (#78887)


Revision tags: llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3
# 13bbca8d 16-Aug-2023 Alfred Persson Forsberg <cat@catcream.org>

[libc] [NFC] explain compiler macros in limits.h

Differential Revision: https://reviews.llvm.org/D158128


# 002cba03 16-Aug-2023 Alfred Persson Forsberg <cat@catcream.org>

[libc] limits.h: include compiler limits if not already included

The LLVM-libc build itself will override include paths and prefer it's
own limits.h over the compiler's limits.h. Because we rely on

[libc] limits.h: include compiler limits if not already included

The LLVM-libc build itself will override include paths and prefer it's
own limits.h over the compiler's limits.h. Because we rely on the
compiler limits.h for numerical limits in LLVM-libc it needs to be
include_next:ed if not already included. The other method to work
around this is to define all numeric macros in place.

Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>

Reviewed By: thesamesam

Differential Revision: https://reviews.llvm.org/D158040

show more ...


# 0fb30668 14-Aug-2023 Alfred Persson Forsberg <cat@catcream.org>

[libc] Add limits.h

This header contains implementation specific constants.

The compiler already provides its own limits.h with numerical limits
conforming to freestanding ISO C. But it is missing

[libc] Add limits.h

This header contains implementation specific constants.

The compiler already provides its own limits.h with numerical limits
conforming to freestanding ISO C. But it is missing extensions like
POSIX, and does for example not include <linux/limits.h> which is
expected on a Linux system, therefore, an LLVM libc implementation of
limits.h is needed for hosted (__STDC_HOSTED__) environments.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D156961

show more ...