From 5be04ec2ceb1df77afbca4fcbf9e92a712612d6f Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:27:12 +0100 Subject: Sync with the latest Gnulib code (d4ec02b3cc) --- gl/limits.in.h | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'gl/limits.in.h') diff --git a/gl/limits.in.h b/gl/limits.in.h index eaeac472..c65eb4c1 100644 --- a/gl/limits.in.h +++ b/gl/limits.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright 2016-2023 Free Software Foundation, Inc. + Copyright 2016-2024 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -99,6 +99,11 @@ # endif #endif +/* Assume no multibyte character is longer than 16 bytes. */ +#ifndef MB_LEN_MAX +# define MB_LEN_MAX 16 +#endif + /* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ #if (! defined ULLONG_WIDTH \ @@ -119,11 +124,26 @@ /* Macros specified by C23. */ -#if (! defined BOOL_WIDTH \ - && (defined _GNU_SOURCE \ - || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) -# define BOOL_MAX 1 -# define BOOL_WIDTH 1 +#if (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)) +# if ! defined BOOL_WIDTH +# define BOOL_WIDTH 1 +# define BOOL_MAX 1 +# elif ! defined BOOL_MAX +# define BOOL_MAX 1 +# endif +#endif + +/* Macro specified by POSIX. */ + +/* The maximum ssize_t value. Although it might not be of ssize_t type + as it should be, it's too much trouble to fix this minor detail. */ +#ifndef SSIZE_MAX +# ifdef _WIN64 +# define SSIZE_MAX LLONG_MAX +# else +# define SSIZE_MAX LONG_MAX +# endif #endif #endif /* _@GUARD_PREFIX@_LIMITS_H */ -- cgit v1.2.3-74-g34f1