[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v3.8-9-g429b349
From: |
Paul Eggert |
Subject: |
grep branch, master, updated. v3.8-9-g429b349 |
Date: |
Tue, 11 Oct 2022 12:05:27 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via 429b3497d18814557195b83008700d0893a3b342 (commit)
via 1dd9bbe724624220a6ea136a1199d5172e5c1312 (commit)
via d14057a8b702fc9e846f78f2107d189beb5475d9 (commit)
via 1b1b496eb2e84af713be471b8c54f0bc3b4c4757 (commit)
from 34ba1256282247ceae75036efcf1a88b4bd22e13 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=429b3497d18814557195b83008700d0893a3b342
commit 429b3497d18814557195b83008700d0893a3b342
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue Oct 11 09:03:59 2022 -0700
maint: prefer stdckdint.h to intprops.h
Prefer the standard C23 ckd_* macros to Gnulibâs *_WRAPV macros.
* bootstrap.conf (gnulib_modules): Add stdckdint.
* src/grep.c, src/kwset.c, src/pcresearch.c:
Include stdckdint.h, and prefer ckd_* to *_WRAPV.
Include intprops.h only if needed.
diff --git a/bootstrap.conf b/bootstrap.conf
index 53355d3..97f9b0d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -78,6 +78,7 @@ regex
safe-read
same-inode
ssize_t
+stdckdint
stddef
stdlib
stpcpy
diff --git a/src/grep.c b/src/grep.c
index 9b9407d..40ddfea 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -24,6 +24,7 @@
#include <wchar.h>
#include <inttypes.h>
#include <stdarg.h>
+#include <stdckdint.h>
#include <stdint.h>
#include <stdio.h>
#include "system.h"
@@ -898,7 +899,7 @@ static intmax_t
add_count (intmax_t a, idx_t b)
{
intmax_t sum;
- if (!INT_ADD_OK (a, b, &sum))
+ if (ckd_add (&sum, a, b))
die (EXIT_TROUBLE, 0, _("input is too large to count"));
return sum;
}
@@ -982,7 +983,7 @@ fillbuf (idx_t save, struct stat const *st)
off_t to_be_read = st->st_size - bufoffset;
ptrdiff_t a;
if (0 <= to_be_read
- && INT_ADD_OK (to_be_read, save + min_after_buflim, &a))
+ && !ckd_add (&a, to_be_read, save + min_after_buflim))
alloc_max = MAX (a, bufalloc + incr_min);
}
diff --git a/src/kwset.c b/src/kwset.c
index fc25a94..ec1bc69 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -27,10 +27,11 @@
#include "kwset.h"
+#include <stdckdint.h>
#include <stdint.h>
#include <sys/types.h>
+
#include "system.h"
-#include "intprops.h"
#include "memchr2.h"
#include "obstack.h"
#include "xalloc.h"
@@ -674,7 +675,7 @@ bmexec_trans (kwset_t kwset, char const *text, idx_t size)
/* Significance of 12: 1 (initial offset) + 10 (skip loop) + 1 (md2). */
idx_t len12;
- if (INT_MULTIPLY_OK (len, 12, &len12) && len12 < size)
+ if (!ckd_mul (&len12, len, 12) && len12 < size)
/* 11 is not a bug, the initial offset happens only once. */
for (ep = text + size - 11 * len; tp <= ep; )
{
diff --git a/src/pcresearch.c b/src/pcresearch.c
index fd8ea0c..6ccfac0 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -20,7 +20,8 @@
#include "search.h"
#include "die.h"
-#include "intprops.h"
+
+#include <stdckdint.h>
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
@@ -106,7 +107,7 @@ jit_exec (struct pcre_comp *pc, char const *subject, idx_t
search_bytes,
{
uint32_t lim;
pcre2_config (PCRE2_CONFIG_DEPTHLIMIT, &lim);
- if (INT_MULTIPLY_WRAPV (lim, 2, &lim))
+ if (ckd_mul (&lim, lim, 2))
return e;
if (!pc->mcontext)
pc->mcontext = pcre2_match_context_create (pc->gcontext);
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=1dd9bbe724624220a6ea136a1199d5172e5c1312
commit 429b3497d18814557195b83008700d0893a3b342
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue Oct 11 09:03:59 2022 -0700
maint: prefer stdckdint.h to intprops.h
Prefer the standard C23 ckd_* macros to Gnulibâs *_WRAPV macros.
* bootstrap.conf (gnulib_modules): Add stdckdint.
* src/grep.c, src/kwset.c, src/pcresearch.c:
Include stdckdint.h, and prefer ckd_* to *_WRAPV.
Include intprops.h only if needed.
diff --git a/bootstrap.conf b/bootstrap.conf
index 53355d3..97f9b0d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -78,6 +78,7 @@ regex
safe-read
same-inode
ssize_t
+stdckdint
stddef
stdlib
stpcpy
diff --git a/src/grep.c b/src/grep.c
index 9b9407d..40ddfea 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -24,6 +24,7 @@
#include <wchar.h>
#include <inttypes.h>
#include <stdarg.h>
+#include <stdckdint.h>
#include <stdint.h>
#include <stdio.h>
#include "system.h"
@@ -898,7 +899,7 @@ static intmax_t
add_count (intmax_t a, idx_t b)
{
intmax_t sum;
- if (!INT_ADD_OK (a, b, &sum))
+ if (ckd_add (&sum, a, b))
die (EXIT_TROUBLE, 0, _("input is too large to count"));
return sum;
}
@@ -982,7 +983,7 @@ fillbuf (idx_t save, struct stat const *st)
off_t to_be_read = st->st_size - bufoffset;
ptrdiff_t a;
if (0 <= to_be_read
- && INT_ADD_OK (to_be_read, save + min_after_buflim, &a))
+ && !ckd_add (&a, to_be_read, save + min_after_buflim))
alloc_max = MAX (a, bufalloc + incr_min);
}
diff --git a/src/kwset.c b/src/kwset.c
index fc25a94..ec1bc69 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -27,10 +27,11 @@
#include "kwset.h"
+#include <stdckdint.h>
#include <stdint.h>
#include <sys/types.h>
+
#include "system.h"
-#include "intprops.h"
#include "memchr2.h"
#include "obstack.h"
#include "xalloc.h"
@@ -674,7 +675,7 @@ bmexec_trans (kwset_t kwset, char const *text, idx_t size)
/* Significance of 12: 1 (initial offset) + 10 (skip loop) + 1 (md2). */
idx_t len12;
- if (INT_MULTIPLY_OK (len, 12, &len12) && len12 < size)
+ if (!ckd_mul (&len12, len, 12) && len12 < size)
/* 11 is not a bug, the initial offset happens only once. */
for (ep = text + size - 11 * len; tp <= ep; )
{
diff --git a/src/pcresearch.c b/src/pcresearch.c
index fd8ea0c..6ccfac0 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -20,7 +20,8 @@
#include "search.h"
#include "die.h"
-#include "intprops.h"
+
+#include <stdckdint.h>
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
@@ -106,7 +107,7 @@ jit_exec (struct pcre_comp *pc, char const *subject, idx_t
search_bytes,
{
uint32_t lim;
pcre2_config (PCRE2_CONFIG_DEPTHLIMIT, &lim);
- if (INT_MULTIPLY_WRAPV (lim, 2, &lim))
+ if (ckd_mul (&lim, lim, 2))
return e;
if (!pc->mcontext)
pc->mcontext = pcre2_match_context_create (pc->gcontext);
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=d14057a8b702fc9e846f78f2107d189beb5475d9
commit 429b3497d18814557195b83008700d0893a3b342
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue Oct 11 09:03:59 2022 -0700
maint: prefer stdckdint.h to intprops.h
Prefer the standard C23 ckd_* macros to Gnulibâs *_WRAPV macros.
* bootstrap.conf (gnulib_modules): Add stdckdint.
* src/grep.c, src/kwset.c, src/pcresearch.c:
Include stdckdint.h, and prefer ckd_* to *_WRAPV.
Include intprops.h only if needed.
diff --git a/bootstrap.conf b/bootstrap.conf
index 53355d3..97f9b0d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -78,6 +78,7 @@ regex
safe-read
same-inode
ssize_t
+stdckdint
stddef
stdlib
stpcpy
diff --git a/src/grep.c b/src/grep.c
index 9b9407d..40ddfea 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -24,6 +24,7 @@
#include <wchar.h>
#include <inttypes.h>
#include <stdarg.h>
+#include <stdckdint.h>
#include <stdint.h>
#include <stdio.h>
#include "system.h"
@@ -898,7 +899,7 @@ static intmax_t
add_count (intmax_t a, idx_t b)
{
intmax_t sum;
- if (!INT_ADD_OK (a, b, &sum))
+ if (ckd_add (&sum, a, b))
die (EXIT_TROUBLE, 0, _("input is too large to count"));
return sum;
}
@@ -982,7 +983,7 @@ fillbuf (idx_t save, struct stat const *st)
off_t to_be_read = st->st_size - bufoffset;
ptrdiff_t a;
if (0 <= to_be_read
- && INT_ADD_OK (to_be_read, save + min_after_buflim, &a))
+ && !ckd_add (&a, to_be_read, save + min_after_buflim))
alloc_max = MAX (a, bufalloc + incr_min);
}
diff --git a/src/kwset.c b/src/kwset.c
index fc25a94..ec1bc69 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -27,10 +27,11 @@
#include "kwset.h"
+#include <stdckdint.h>
#include <stdint.h>
#include <sys/types.h>
+
#include "system.h"
-#include "intprops.h"
#include "memchr2.h"
#include "obstack.h"
#include "xalloc.h"
@@ -674,7 +675,7 @@ bmexec_trans (kwset_t kwset, char const *text, idx_t size)
/* Significance of 12: 1 (initial offset) + 10 (skip loop) + 1 (md2). */
idx_t len12;
- if (INT_MULTIPLY_OK (len, 12, &len12) && len12 < size)
+ if (!ckd_mul (&len12, len, 12) && len12 < size)
/* 11 is not a bug, the initial offset happens only once. */
for (ep = text + size - 11 * len; tp <= ep; )
{
diff --git a/src/pcresearch.c b/src/pcresearch.c
index fd8ea0c..6ccfac0 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -20,7 +20,8 @@
#include "search.h"
#include "die.h"
-#include "intprops.h"
+
+#include <stdckdint.h>
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
@@ -106,7 +107,7 @@ jit_exec (struct pcre_comp *pc, char const *subject, idx_t
search_bytes,
{
uint32_t lim;
pcre2_config (PCRE2_CONFIG_DEPTHLIMIT, &lim);
- if (INT_MULTIPLY_WRAPV (lim, 2, &lim))
+ if (ckd_mul (&lim, lim, 2))
return e;
if (!pc->mcontext)
pc->mcontext = pcre2_match_context_create (pc->gcontext);
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=1b1b496eb2e84af713be471b8c54f0bc3b4c4757
commit 429b3497d18814557195b83008700d0893a3b342
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue Oct 11 09:03:59 2022 -0700
maint: prefer stdckdint.h to intprops.h
Prefer the standard C23 ckd_* macros to Gnulibâs *_WRAPV macros.
* bootstrap.conf (gnulib_modules): Add stdckdint.
* src/grep.c, src/kwset.c, src/pcresearch.c:
Include stdckdint.h, and prefer ckd_* to *_WRAPV.
Include intprops.h only if needed.
diff --git a/bootstrap.conf b/bootstrap.conf
index 53355d3..97f9b0d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -78,6 +78,7 @@ regex
safe-read
same-inode
ssize_t
+stdckdint
stddef
stdlib
stpcpy
diff --git a/src/grep.c b/src/grep.c
index 9b9407d..40ddfea 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -24,6 +24,7 @@
#include <wchar.h>
#include <inttypes.h>
#include <stdarg.h>
+#include <stdckdint.h>
#include <stdint.h>
#include <stdio.h>
#include "system.h"
@@ -898,7 +899,7 @@ static intmax_t
add_count (intmax_t a, idx_t b)
{
intmax_t sum;
- if (!INT_ADD_OK (a, b, &sum))
+ if (ckd_add (&sum, a, b))
die (EXIT_TROUBLE, 0, _("input is too large to count"));
return sum;
}
@@ -982,7 +983,7 @@ fillbuf (idx_t save, struct stat const *st)
off_t to_be_read = st->st_size - bufoffset;
ptrdiff_t a;
if (0 <= to_be_read
- && INT_ADD_OK (to_be_read, save + min_after_buflim, &a))
+ && !ckd_add (&a, to_be_read, save + min_after_buflim))
alloc_max = MAX (a, bufalloc + incr_min);
}
diff --git a/src/kwset.c b/src/kwset.c
index fc25a94..ec1bc69 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -27,10 +27,11 @@
#include "kwset.h"
+#include <stdckdint.h>
#include <stdint.h>
#include <sys/types.h>
+
#include "system.h"
-#include "intprops.h"
#include "memchr2.h"
#include "obstack.h"
#include "xalloc.h"
@@ -674,7 +675,7 @@ bmexec_trans (kwset_t kwset, char const *text, idx_t size)
/* Significance of 12: 1 (initial offset) + 10 (skip loop) + 1 (md2). */
idx_t len12;
- if (INT_MULTIPLY_OK (len, 12, &len12) && len12 < size)
+ if (!ckd_mul (&len12, len, 12) && len12 < size)
/* 11 is not a bug, the initial offset happens only once. */
for (ep = text + size - 11 * len; tp <= ep; )
{
diff --git a/src/pcresearch.c b/src/pcresearch.c
index fd8ea0c..6ccfac0 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -20,7 +20,8 @@
#include "search.h"
#include "die.h"
-#include "intprops.h"
+
+#include <stdckdint.h>
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
@@ -106,7 +107,7 @@ jit_exec (struct pcre_comp *pc, char const *subject, idx_t
search_bytes,
{
uint32_t lim;
pcre2_config (PCRE2_CONFIG_DEPTHLIMIT, &lim);
- if (INT_MULTIPLY_WRAPV (lim, 2, &lim))
+ if (ckd_mul (&lim, lim, 2))
return e;
if (!pc->mcontext)
pc->mcontext = pcre2_match_context_create (pc->gcontext);
-----------------------------------------------------------------------
Summary of changes:
bootstrap.conf | 2 ++
gnulib | 2 +-
src/dfasearch.c | 2 +-
src/grep.c | 5 +++--
src/kwset.c | 5 +++--
src/pcresearch.c | 5 ++++-
6 files changed, 14 insertions(+), 7 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v3.8-9-g429b349,
Paul Eggert <=