summaryrefslogtreecommitdiffstats
path: root/lib/limits.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/limits.in.h')
-rw-r--r--lib/limits.in.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/limits.in.h b/lib/limits.in.h
index 45d46fd..c65eb4c 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <limits.h>.
- 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
@@ -130,7 +130,19 @@
# define BOOL_WIDTH 1
# define BOOL_MAX 1
# elif ! defined BOOL_MAX
-# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1)
+# 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