From: Karl Berry Date: Tue, 31 Aug 2021 15:30:42 +0000 (-0700) Subject: autoupdate X-Git-Tag: v1.0~2621 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a4e28bb23a248e8c3c6fc5df6a64ffca16a6cad1;p=gnulib.git autoupdate --- diff --git a/lib/idx.h b/lib/idx.h index 54ad5d81fe..483587eabb 100644 --- a/lib/idx.h +++ b/lib/idx.h @@ -56,26 +56,6 @@ * Because 'size_t' is an unsigned type, and a signed type is better. See above. - Why not use 'ssize_t'? - - * 'ptrdiff_t' is more portable; it is standardized by ISO C - whereas 'ssize_t' is standardized only by POSIX. - - * 'ssize_t' is not required to be as wide as 'size_t', and some - now-obsolete POSIX platforms had 'size_t' wider than 'ssize_t'. - - * Conversely, some now-obsolete platforms had 'ptrdiff_t' wider - than 'size_t', which can be a win and conforms to POSIX. - - Won't this cause a problem with objects larger than PTRDIFF_MAX? - - * Typical modern or large platforms do not allocate such objects, - so this is not much of a problem in practice; for example, you - can safely write 'idx_t len = strlen (s);'. To port to older - small platforms where allocations larger than PTRDIFF_MAX could - in theory be a problem, you can use Gnulib's ialloc module, or - functions like ximalloc in Gnulib's xalloc module. - Why not use 'ptrdiff_t' directly? * Maintainability: When reading and modifying code, it helps to know that