* lib/regex_internal.h (IDX_MAX) [_REGEX_LARGE_OFFSETS]:
Port to non-POSIX platforms where limits.h does not define SSIZE_MAX.
This is for Gawk, which does not use Gnulib limits.h.
2026-04-27 Paul Eggert <eggert@cs.ucla.edu>
+ regex: SSIZE_MAX porting
+ * lib/regex_internal.h (IDX_MAX) [_REGEX_LARGE_OFFSETS]:
+ Port to non-POSIX platforms where limits.h does not define SSIZE_MAX.
+ This is for Gawk, which does not use Gnulib limits.h.
+
idx: cleaner namespace on GNU
* lib/idx.h: Include <stddef.h>, <stdint.h> only if needed.
(idx_t, IDX_MAX): Rely on builtin macros __PTRDIFF_TYPE__,
reindenting a lot of regex code that formerly used 'int'. */
typedef regoff_t Idx;
#ifdef _REGEX_LARGE_OFFSETS
-# define IDX_MAX SSIZE_MAX
+# ifdef SSIZE_MAX
+# define IDX_MAX SSIZE_MAX
+# else
+# define IDX_MAX ((Idx) ((size_t) -1 / 2))
+# endif
#else
# define IDX_MAX INT_MAX
#endif