aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diffseq.h
diff options
context:
space:
mode:
authorPaul Eggert2023-06-07 12:00:15 -0700
committerPaul Eggert2023-06-07 12:04:00 -0700
commita902156068ab071f93cc9bbd34cd320919b74064 (patch)
treea5330a33e9f3f363e3021e3ecf91cb98806f7584 /lib/diffseq.h
parentf68d962ede0cc3d7758d3304e7411a10694acce8 (diff)
downloademacs-a902156068ab071f93cc9bbd34cd320919b74064.tar.gz
emacs-a902156068ab071f93cc9bbd34cd320919b74064.zip
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib/diffseq.h')
-rw-r--r--lib/diffseq.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/diffseq.h b/lib/diffseq.h
index dfaf4f295e8..06e1465bf1b 100644
--- a/lib/diffseq.h
+++ b/lib/diffseq.h
@@ -48,6 +48,10 @@
48 OFFSET A signed integer type sufficient to hold the 48 OFFSET A signed integer type sufficient to hold the
49 difference between two indices. Usually 49 difference between two indices. Usually
50 something like ptrdiff_t. 50 something like ptrdiff_t.
51 OFFSET_MAX (Optional) The maximum value of OFFSET (e.g.,
52 PTRDIFF_MAX). If omitted, it is inferred in a
53 way portable to the vast majority of C platforms,
54 as they lack padding bits.
51 EXTRA_CONTEXT_FIELDS Declarations of fields for 'struct context'. 55 EXTRA_CONTEXT_FIELDS Declarations of fields for 'struct context'.
52 NOTE_DELETE(ctxt, xoff) Record the removal of the object xvec[xoff]. 56 NOTE_DELETE(ctxt, xoff) Record the removal of the object xvec[xoff].
53 NOTE_INSERT(ctxt, yoff) Record the insertion of the object yvec[yoff]. 57 NOTE_INSERT(ctxt, yoff) Record the insertion of the object yvec[yoff].
@@ -74,8 +78,10 @@
74 */ 78 */
75 79
76/* Maximum value of type OFFSET. */ 80/* Maximum value of type OFFSET. */
77#define OFFSET_MAX \ 81#ifndef OFFSET_MAX
78 ((((OFFSET)1 << (sizeof (OFFSET) * CHAR_BIT - 2)) - 1) * 2 + 1) 82# define OFFSET_MAX \
83 ((((OFFSET) 1 << (sizeof (OFFSET) * CHAR_BIT - 2)) - 1) * 2 + 1)
84#endif
79 85
80/* Default to no early abort. */ 86/* Default to no early abort. */
81#ifndef EARLY_ABORT 87#ifndef EARLY_ABORT
@@ -88,11 +94,17 @@
88 94
89/* Use this to suppress gcc's "...may be used before initialized" warnings. 95/* Use this to suppress gcc's "...may be used before initialized" warnings.
90 Beware: The Code argument must not contain commas. */ 96 Beware: The Code argument must not contain commas. */
97#if __GNUC__ + (__GNUC_MINOR__ >= 7) > 4
98# pragma GCC diagnostic push
99#endif
91#ifndef IF_LINT 100#ifndef IF_LINT
92# if defined GCC_LINT || defined lint 101# if defined GCC_LINT || defined lint
93# define IF_LINT(Code) Code 102# define IF_LINT(Code) Code
94# else 103# else
95# define IF_LINT(Code) /* empty */ 104# define IF_LINT(Code) /* empty */
105# if __GNUC__ + (__GNUC_MINOR__ >= 7) > 4
106# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
107# endif
96# endif 108# endif
97#endif 109#endif
98 110
@@ -556,6 +568,10 @@ compareseq (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim,
556 #undef XREF_YREF_EQUAL 568 #undef XREF_YREF_EQUAL
557} 569}
558 570
571#if __GNUC__ + (__GNUC_MINOR__ >= 7) > 4
572# pragma GCC diagnostic pop
573#endif
574
559#undef ELEMENT 575#undef ELEMENT
560#undef EQUAL 576#undef EQUAL
561#undef OFFSET 577#undef OFFSET