* NEWS: Mention this.
* lib/diffseq.h (OFFSET_MAX): Don’t define;
this is now the user’s responsibility.
* lib/fstrcmp.c (OFFSET_MAX): Define to PTRDIFF_MAX.
+2023-05-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ diffseq: don’t assume integers lack padding
+ * NEWS: Mention this.
+ * lib/diffseq.h (OFFSET_MAX): Don’t define;
+ this is now the user’s responsibility.
+ * lib/fstrcmp.c (OFFSET_MAX): Define to PTRDIFF_MAX.
+
2023-05-18 Bruno Haible <bruno@clisp.org>
getndelim2: Silence gcc warning.
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).
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. */
-#define OFFSET_MAX \
- ((((OFFSET)1 << (sizeof (OFFSET) * CHAR_BIT - 2)) - 1) * 2 + 1)
-
/* Default to no early abort. */
#ifndef EARLY_ABORT
# define EARLY_ABORT(ctxt) false
#define ELEMENT char
#define EQUAL(x,y) ((x) == (y))
#define OFFSET ptrdiff_t
+#define OFFSET_MAX PTRDIFF_MAX
#define EXTRA_CONTEXT_FIELDS \
/* The number of edits beyond which the computation can be aborted. */ \
ptrdiff_t edit_count_limit; \