+2021-01-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ canonicalize: remove NARROW_ADDRESSES optimization
+ * lib/canonicalize-lgpl.c, lib/canonicalize.c (NARROW_ADDRESSES):
+ Remove, and remove all uses, as the optimization is arguably not
+ worth the extra complexity. Suggested by Adhemerval Zanella in:
+ https://sourceware.org/pipermail/libc-alpha/2020-December/121203.html
+
2021-01-01 Bruno Haible <bruno@clisp.org>
stddef: Try harder to get max_align_t defined on OpenBSD.
# define IF_LINT(Code) /* empty */
#endif
-/* True if adding two valid object sizes might overflow idx_t.
- As a practical matter, this cannot happen on 64-bit machines. */
-enum { NARROW_ADDRESSES = IDX_MAX >> 31 >> 31 == 0 };
-
#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
# define DOUBLE_SLASH_IS_DISTINCT_ROOT false
#endif
if (end_in_extra_buffer)
end_idx = end - extra_buf;
size_t len = strlen (end);
- if (NARROW_ADDRESSES && INT_ADD_OVERFLOW (len, n))
+ if (INT_ADD_OVERFLOW (len, n))
{
__set_errno (ENOMEM);
goto error_nomem;
# define IF_LINT(Code) /* empty */
#endif
-/* True if adding two valid object sizes might overflow idx_t.
- As a practical matter, this cannot happen on 64-bit machines. */
-enum { NARROW_ADDRESSES = IDX_MAX >> 31 >> 31 == 0 };
-
#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
# define DOUBLE_SLASH_IS_DISTINCT_ROOT false
#endif
if (end_in_extra_buffer)
end_idx = end - extra_buf;
size_t len = strlen (end);
- if (NARROW_ADDRESSES && INT_ADD_OVERFLOW (len, n))
+ if (INT_ADD_OVERFLOW (len, n))
xalloc_die ();
while (extra_buffer.length <= len + n)
{