+2023-05-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ diffseq: backward compatibility for OFFSET_MAX
+ * lib/diffseq.h (OFFSET_MAX): Define only if not already defined.
+
2023-05-19 Bruno Haible <bruno@clisp.org>
careadlinkat: Silence gcc warning for GCC ≥ 12.
Date Modules Changes
-2023-05-19 diffseq Includers should now also define OFFSET_MAX.
-
2023-04-28 largefile-required
year2038-required
Modules removed, for consistency with Autoconf
OFFSET A signed integer type sufficient to hold the
difference between two indices. Usually
something like ptrdiff_t.
- OFFSET_MAX The maximum value of OFFSET (e.g., PTRDIFF_MAX).
+ OFFSET_MAX (Optional) The maximum value of OFFSET (e.g.,
+ PTRDIFF_MAX). If omitted, it is inferred in a
+ way portable to the vast majority of C platforms,
+ as they lack padding bits.
EXTRA_CONTEXT_FIELDS Declarations of fields for 'struct context'.
NOTE_DELETE(ctxt, xoff) Record the removal of the object xvec[xoff].
NOTE_INSERT(ctxt, yoff) Record the insertion of the object yvec[yoff].
#include "minmax.h"
*/
+/* Maximum value of type OFFSET. */
+#ifndef OFFSET_MAX
+# define OFFSET_MAX \
+ ((((OFFSET) 1 << (sizeof (OFFSET) * CHAR_BIT - 2)) - 1) * 2 + 1)
+#endif
+
/* Default to no early abort. */
#ifndef EARLY_ABORT
# define EARLY_ABORT(ctxt) false