]> Savannah Git Hosting - gnulib.git/commitdiff
limits-h: other modules can rely on SSIZE_MAX
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 20 May 2023 20:48:00 +0000 (13:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 May 2023 03:33:22 +0000 (20:33 -0700)
* lib/areadlink-with-size.c (SSIZE_MAX):
Do not define.
* modules/areadlink-with-size (Depends-on):
Add limits-h.

ChangeLog
lib/areadlink-with-size.c
modules/areadlink-with-size

index bdf456941cf6934fa4206fd53d0f7b5f2fcbc810..b93bbba420868636405c61db9350c7662d927fc5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2023-05-20  Paul Eggert  <eggert@cs.ucla.edu>
 
+       limits-h: other modules can rely on SSIZE_MAX
+       * lib/areadlink-with-size.c (SSIZE_MAX):
+       Do not define.
+       * modules/areadlink-with-size (Depends-on):
+       Add limits-h.
+
        limits-h: define SSIZE_MAX
        * doc/posix-headers/limits.texi (limits.h): Document this.
        * lib/limits.in.h (SSIZE_MAX): Define if not already defined.
index 896e4e1f42f2a487c0012fe83975f4ec651482f0..7af97c25504700efa8e0db4f6e7c4cacc012f6bb 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
-#ifndef SSIZE_MAX
-# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
-#endif
-
 /* SYMLINK_MAX is used only for an initial memory-allocation sanity
    check, so it's OK to guess too small on hosts where there is no
    arbitrary limit to symbolic link length.  */
index 40846425d2536f5e243d3a485691fcb47384e4b6..d755e3094c8751b22004807d5d3d4124222bb747 100644 (file)
@@ -7,6 +7,7 @@ lib/areadlink-with-size.c
 
 Depends-on:
 free-posix
+limits-h
 readlink
 ssize_t
 stdint