]> Savannah Git Hosting - gnulib.git/commitdiff
regex: use limits-h SSIZE_MAX
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 20 May 2023 22:24:05 +0000 (15:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 May 2023 03:33:23 +0000 (20:33 -0700)
ChangeLog
lib/regex_internal.h
modules/regex

index f104169d900be868d5d59ea136388f5fcd8ddb1d..7253bd7ea371f452020c449866e180480cb75235 100644 (file)
--- 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
index 0270091df7016fa9ddb80e8f94d37c14e031674a..7e35a112ec24fbf0006b3b495d4f9396e9e9ebeb 100644 (file)
    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
index e38479858f80b9f9e9aa358bec16363cf91bdfd2..1fa07229634222feb992b872d1cdd44aa3fa8a8c 100644 (file)
@@ -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]