[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, feature/cpp-compile, updated. gawk-4.1.0-5475-g450a68
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, feature/cpp-compile, updated. gawk-4.1.0-5475-g450a68bb |
Date: |
Sat, 25 Feb 2023 13:08:43 -0500 (EST) |
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 "gawk".
The branch, feature/cpp-compile has been updated
via 450a68bb552df0292a7430c837eedf4a901c0777 (commit)
from 6e740f508b3cd6825362c1f950478b52000089c0 (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.sv.gnu.org/cgit/gawk.git/commit/?id=450a68bb552df0292a7430c837eedf4a901c0777
commit 450a68bb552df0292a7430c837eedf4a901c0777
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Sat Feb 25 20:08:18 2023 +0200
Make everything compile with g++ again.
diff --git a/builtin.c b/builtin.c
index a62acf98..5657d01c 100644
--- a/builtin.c
+++ b/builtin.c
@@ -800,6 +800,7 @@ format_tree(
bool modifier_seen[sizeof(bad_modifiers)-1];
#define modifier_index(c) (strchr(bad_modifiers, c) - bad_modifiers)
+ bool need_to_add_thousands = false;
#define INITIAL_OUT_SIZE 64
emalloc(obuf, char *, INITIAL_OUT_SIZE, "format_tree");
@@ -1617,7 +1618,7 @@ mpf1:
setlocale(LC_NUMERIC, "");
#endif
- bool need_to_add_thousands = false;
+ need_to_add_thousands = false;
switch (fmt_type) {
#ifdef HAVE_MPFR
case MP_INT_WITH_PREC:
@@ -1644,7 +1645,7 @@ mpf1:
default:
if (have_prec || tolower(cs1) != 'a') {
sprintf(cp, "*.*%c", cs1);
- while ((size_t)(nc = snprintf(obufout,
ofre, cpbuf,
+ while ((nc = snprintf(obufout, ofre,
cpbuf,
(int) fw, (int) prec,
(double) tmpval)) >= (int)
ofre)
chksize(nc)
@@ -1652,7 +1653,7 @@ mpf1:
// For %a and %A, use the default
precision if it
// wasn't supplied by the user.
sprintf(cp, "*%c", cs1);
- while ((size_t)(nc = snprintf(obufout,
ofre, cpbuf,
+ while ((nc = snprintf(obufout, ofre,
cpbuf,
(int) fw,
(double) tmpval)) >= (int)
ofre)
chksize(nc)
diff --git a/debug.c b/debug.c
index 67e8380b..744dd4d1 100644
--- a/debug.c
+++ b/debug.c
@@ -625,7 +625,7 @@ print_lines(char *src, int start_line, int nlines)
supposed_len = pos[i] - pos[i - 1];
len = read(s->fd, p, supposed_len);
switch (len) {
- case -1:
+ case (size_t) -1:
d_error(_("cannot read source file `%s': %s"),
src, strerror(errno));
return -1;
diff --git a/gawkapi.c b/gawkapi.c
index 61008b0b..ea66d63c 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -178,7 +178,7 @@ awk_value_to_node(const awk_value_t *retval)
mpfr_init(ext_ret_val->mpg_numbr);
tval = mpfr_set(ext_ret_val->mpg_numbr, (mpfr_srcptr)
retval->num_ptr, ROUND_MODE);
IEEE_FMT(ext_ret_val->mpg_numbr, tval);
- mpfr_clear(retval->num_ptr);
+ mpfr_clear((mpfr_ptr) retval->num_ptr);
#else
fatal(_("awk_value_to_node: MPFR not supported"));
#endif
@@ -190,7 +190,7 @@ awk_value_to_node(const awk_value_t *retval)
ext_ret_val = make_number_node(MPZN);
mpz_init(ext_ret_val->mpg_i);
mpz_set(ext_ret_val->mpg_i, (mpz_ptr) retval->num_ptr);
- mpz_clear(retval->num_ptr);
+ mpz_clear((mpz_ptr) retval->num_ptr);
#else
fatal(_("awk_value_to_node: MPFR not supported"));
#endif
diff --git a/io.c b/io.c
index 27df7139..d29476f7 100644
--- a/io.c
+++ b/io.c
@@ -3186,7 +3186,7 @@ find_input_parser(IOBUF *iop)
awk_input_parser_t *ip, *ip2;
/* if already associated with an input parser, bail out early */
- if (iop->public._get_record != NULL || iop->public.read_func != read)
+ if (iop->public_.get_record != NULL || iop->public_.read_func != read)
return;
ip = ip2 = NULL;
diff --git a/main.c b/main.c
index d8ab03da..e7c62abd 100644
--- a/main.c
+++ b/main.c
@@ -1754,7 +1754,7 @@ parse_args(int argc, char **argv)
case 'T': // --persist[=file]
#ifdef USE_PERSISTENT_MALLOC
if (optarg == NULL)
- optarg = "/some/file";
+ optarg = (char *) "/some/file";
fatal(_("Use `GAWK_PERSIST_FILE=%s gawk ...' instead of
--persist."), optarg);
#else
warning(_("Persistent memory is not supported."));
@@ -1928,7 +1928,7 @@ check_pma_security(const char *pma_file)
} else if (euid == 0) {
fprintf(stderr, _("%s: fatal: using persistent memory is not
allowed when running as root.\n"), myname);
exit(EXIT_FATAL);
- } else if (sbuf.st_uid != euid) {
+ } else if (sbuf.st_uid != (uid_t) euid) {
fprintf(stderr, _("%s: warning: %s is not owned by euid %d.\n"),
myname, pma_file, euid);
}
diff --git a/str_array.c b/str_array.c
index 8e4362ba..fb45f0a9 100644
--- a/str_array.c
+++ b/str_array.c
@@ -790,7 +790,7 @@ static unsigned long
fnv1a_hash_string(const char *str, size_t len, unsigned long hsize, size_t
*code)
{
/* FNV-1a */
- register unsigned ret = 2166136261U;
+ unsigned ret = 2166136261U;
while (len > 0) {
ret ^= (unsigned char) (*str++);
diff --git a/support/pma.h b/support/pma.h
index 96b450f2..2d64723b 100644
--- a/support/pma.h
+++ b/support/pma.h
@@ -22,6 +22,10 @@
#ifndef PMA_H_INCLUDED
#define PMA_H_INCLUDED
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
// version strings of interface and implementation should match
#define PMA_H_VERSION "2022.10Oct.30.1667172241 (Avon 8-g1)"
extern const char pma_version[];
@@ -84,4 +88,8 @@ extern void pma_check_and_dump(void);
to be re-sparsified with fallocate (v == 0x0). */
extern void pma_set_avail_mem(const unsigned long v);
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif // PMA_H_INCLUDED
-----------------------------------------------------------------------
Summary of changes:
builtin.c | 7 ++++---
debug.c | 2 +-
gawkapi.c | 4 ++--
io.c | 2 +-
main.c | 4 ++--
str_array.c | 2 +-
support/pma.h | 8 ++++++++
7 files changed, 19 insertions(+), 10 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, feature/cpp-compile, updated. gawk-4.1.0-5475-g450a68bb,
Arnold Robbins <=