summaryrefslogtreecommitdiffstats
path: root/gl/limits.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/limits.in.h')
-rw-r--r--gl/limits.in.h38
1 files changed, 29 insertions, 9 deletions
diff --git a/gl/limits.in.h b/gl/limits.in.h
index eaeac472..c33c59e1 100644
--- a/gl/limits.in.h
+++ b/gl/limits.in.h
@@ -1,6 +1,6 @@
1/* A GNU-like <limits.h>. 1/* A GNU-like <limits.h>.
2 2
3 Copyright 2016-2023 Free Software Foundation, Inc. 3 Copyright 2016-2025 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -20,7 +20,7 @@
20#endif 20#endif
21@PRAGMA_COLUMNS@ 21@PRAGMA_COLUMNS@
22 22
23#if defined _GL_ALREADY_INCLUDING_LIMITS_H 23#if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
24/* Special invocation convention: 24/* Special invocation convention:
25 On Haiku/x86_64, we have a sequence of nested includes 25 On Haiku/x86_64, we have a sequence of nested includes
26 <limits.h> -> <syslimits.h> -> <limits.h>. 26 <limits.h> -> <syslimits.h> -> <limits.h>.
@@ -34,12 +34,12 @@
34 34
35#ifndef _@GUARD_PREFIX@_LIMITS_H 35#ifndef _@GUARD_PREFIX@_LIMITS_H
36 36
37# define _GL_ALREADY_INCLUDING_LIMITS_H 37# define _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
38 38
39/* The include_next requires a split double-inclusion guard. */ 39/* The include_next requires a split double-inclusion guard. */
40# @INCLUDE_NEXT@ @NEXT_LIMITS_H@ 40# @INCLUDE_NEXT@ @NEXT_LIMITS_H@
41 41
42# undef _GL_ALREADY_INCLUDING_LIMITS_H 42# undef _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
43 43
44#ifndef _@GUARD_PREFIX@_LIMITS_H 44#ifndef _@GUARD_PREFIX@_LIMITS_H
45#define _@GUARD_PREFIX@_LIMITS_H 45#define _@GUARD_PREFIX@_LIMITS_H
@@ -99,6 +99,11 @@
99# endif 99# endif
100#endif 100#endif
101 101
102/* Assume no multibyte character is longer than 16 bytes. */
103#ifndef MB_LEN_MAX
104# define MB_LEN_MAX 16
105#endif
106
102/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ 107/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */
103 108
104#if (! defined ULLONG_WIDTH \ 109#if (! defined ULLONG_WIDTH \
@@ -119,11 +124,26 @@
119 124
120/* Macros specified by C23. */ 125/* Macros specified by C23. */
121 126
122#if (! defined BOOL_WIDTH \ 127#if (defined _GNU_SOURCE \
123 && (defined _GNU_SOURCE \ 128 || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))
124 || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) 129# if ! defined BOOL_WIDTH
125# define BOOL_MAX 1 130# define BOOL_WIDTH 1
126# define BOOL_WIDTH 1 131# define BOOL_MAX 1
132# elif ! defined BOOL_MAX
133# define BOOL_MAX 1
134# endif
135#endif
136
137/* Macro specified by POSIX. */
138
139/* The maximum ssize_t value. Although it might not be of ssize_t type
140 as it should be, it's too much trouble to fix this minor detail. */
141#ifndef SSIZE_MAX
142# ifdef _WIN64
143# define SSIZE_MAX LLONG_MAX
144# else
145# define SSIZE_MAX LONG_MAX
146# endif
127#endif 147#endif
128 148
129#endif /* _@GUARD_PREFIX@_LIMITS_H */ 149#endif /* _@GUARD_PREFIX@_LIMITS_H */