From: Paul Eggert Date: Sat, 20 May 2023 22:24:05 +0000 (-0700) Subject: regex: use limits-h SSIZE_MAX X-Git-Tag: v1.0~1299 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c8310c0658aed3981f9f77a8a8e8289239baf4ad;p=gnulib.git regex: use limits-h SSIZE_MAX --- diff --git a/ChangeLog b/ChangeLog index f104169d90..7253bd7ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,9 +3,11 @@ limits-h: other modules can rely on SSIZE_MAX * lib/areadlink-with-size.c, lib/areadlinkat-with-size.c: * lib/careadlinkat.c, lib/getdelim.c, lib/getndelim2.c: + * lib/regex_internal.h: (SSIZE_MAX): Do not define. * modules/areadlink-with-size, modules/areadlinkat-with-size: * modules/careadlinkat, modules/getdelim, modules/getndelim2: + * modules/regex: (Depends-on) Add limits-h. limits-h: define SSIZE_MAX diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 0270091df7..7e35a112ec 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -151,9 +151,6 @@ as some non-GCC platforms lack them, an issue when this code is used in Gnulib. */ -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif #ifndef ULONG_WIDTH # define ULONG_WIDTH REGEX_UINTEGER_WIDTH (ULONG_MAX) /* The number of usable bits in an unsigned integer type with maximum diff --git a/modules/regex b/modules/regex index e38479858f..1fa0722963 100644 --- a/modules/regex +++ b/modules/regex @@ -28,6 +28,7 @@ intprops [test $ac_use_included_regex = yes] iswctype [test $ac_use_included_regex = yes] langinfo [test $ac_use_included_regex = yes] libc-config [test $ac_use_included_regex = yes] +limits-h [test $ac_use_included_regex = yes] lock [test $ac_use_included_regex = yes] memcmp [test $ac_use_included_regex = yes] memmove [test $ac_use_included_regex = yes]