gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4940-g9fa1ccae


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4940-g9fa1ccae
Date: Mon, 31 Oct 2022 02:53:22 -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 "gawk".

The branch, gawk-5.2-stable has been updated
       via  9fa1ccaee4dab4d1a1fb5d1264544cb41550933b (commit)
       via  ccbe57decc78fb34c1183e96b4c5b8a3af1826d9 (commit)
      from  46cba4567028a61212be90b0ebb192c4734c007d (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=9fa1ccaee4dab4d1a1fb5d1264544cb41550933b

commit 9fa1ccaee4dab4d1a1fb5d1264544cb41550933b
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Mon Oct 31 08:52:48 2022 +0200

    Bump patchlevel for beta release.

diff --git a/configure b/configure
index 85d85429..8a6e0f99 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for GNU Awk 5.2.0.
+# Generated by GNU Autoconf 2.71 for GNU Awk 5.2.0a.
 #
 # Report bugs to <bug-gawk@gnu.org>.
 #
@@ -611,8 +611,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GNU Awk'
 PACKAGE_TARNAME='gawk'
-PACKAGE_VERSION='5.2.0'
-PACKAGE_STRING='GNU Awk 5.2.0'
+PACKAGE_VERSION='5.2.0a'
+PACKAGE_STRING='GNU Awk 5.2.0a'
 PACKAGE_BUGREPORT='bug-gawk@gnu.org'
 PACKAGE_URL='https://www.gnu.org/software/gawk/'
 
@@ -1374,7 +1374,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GNU Awk 5.2.0 to adapt to many kinds of systems.
+\`configure' configures GNU Awk 5.2.0a to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1445,7 +1445,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU Awk 5.2.0:";;
+     short | recursive ) echo "Configuration of GNU Awk 5.2.0a:";;
    esac
   cat <<\_ACEOF
 
@@ -1570,7 +1570,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU Awk configure 5.2.0
+GNU Awk configure 5.2.0a
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2227,7 +2227,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GNU Awk $as_me 5.2.0, which was
+It was created by GNU Awk $as_me 5.2.0a, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3522,7 +3522,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gawk'
- VERSION='5.2.0'
+ VERSION='5.2.0a'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -14377,7 +14377,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GNU Awk $as_me 5.2.0, which was
+This file was extended by GNU Awk $as_me 5.2.0a, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14447,7 +14447,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | 
sed "s/^ //; s/'/'\\\\\\\\
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-GNU Awk config.status 5.2.0
+GNU Awk config.status 5.2.0a
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 1b87be89..408f9776 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl
 
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT([GNU Awk],[5.2.0],[bug-gawk@gnu.org],[gawk])
+AC_INIT([GNU Awk],[5.2.0a],[bug-gawk@gnu.org],[gawk])
 
 # This is a hack. Different versions of install on different systems
 # are just too different. Chuck it and use install-sh.

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=ccbe57decc78fb34c1183e96b4c5b8a3af1826d9

commit ccbe57decc78fb34c1183e96b4c5b8a3af1826d9
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Mon Oct 31 08:50:44 2022 +0200

    Update pma to Avon 8.

diff --git a/support/ChangeLog b/support/ChangeLog
index 06e05fcf..3728e08c 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-31         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * pma.h, pma.c: Updated to Avon 8.
+
 2022-10-28         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.am (DEBUG): New variable with debug compilation flags.
diff --git a/support/pma.c b/support/pma.c
index e9f3b092..9f582a26 100644
--- a/support/pma.c
+++ b/support/pma.c
@@ -43,12 +43,9 @@
 
 #include "pma.h"
 
-#ifndef MAP_NORESERVE
-#define MAP_NORESERVE 0
-#endif /* MAP_NORESERVE */
 
 // Software version; not the same as backing file format version.
-const char pma_version[] = "2022.08Aug.03.1659520468 (Avon 7-g1)";
+const char pma_version[] = "2022.10Oct.30.1667172241 (Avon 8-g1)";
 
 #define S(s) #s
 #define S2(s) S(s)
@@ -341,19 +338,31 @@ static void flr(ao_t *p) {  // remove ao from free list
   p->fprev = p->fnext = NULL;
 }
 
+// MAP_NORESERVE is not available on all systems.  It might be safe to simply 
remove this
+// flag below if your system lacks it, though this expedient has not been 
tested extensively.
+
+// Here in gawk, we like to live dangerously:
+#ifndef MAP_NORESERVE
+#define MAP_NORESERVE 0
+#endif /* MAP_NORESERVE */
+
 #define MMAP(N) mmap(NULL, (N), PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | 
MAP_NORESERVE, -1, 0)
 #define MUNMAP(A, N) do { if (0 != munmap((A), (N))) { ERR("munmap()" ERN); 
SERN; } } while (0)
 static void * addrgap(off_t n) {  // find big gap in address space to map n 
bytes
-  void *A, *Amax = NULL;  size_t L = 0, U, Max = 0, N = (size_t)n;  char *r;
+  void *A, *Amax = NULL;  size_t L, U, Max = 0, N = (size_t)n;  char *r;
   FYI("addrgap(%jd)\n", (intmax_t)n);  // TODO: better way to handle off_t
   if (N < sizeof(pma_hdr_t) + 40960) { ERR("file size %zu too small\n", N); 
SERN; }
-  for (U = 1; ; U *= 2)  // double upper bound until failure
-    if (MAP_FAILED == (A = MMAP(U))) break;
-    else                   MUNMAP(A, U);
-  while (1 + L < U) {  // binary search between bounds
+  // Binary search to find max length of successfull mmap().
+  // Invariants:
+  //   Larger max might lie in range [L,U] inclusive.
+  //   If a previous max has been found, it must lie in [1,L-1].
+  //   A larger max cannot lie in [U+1,UINT64_MAX].
+  L = 1;  // mmap fails if length == 0 (SUSv3)
+  U = UINT64_MAX;
+  while (L <= U) {
     size_t M = L + (U - L) / 2;  // avoid overflow
-    if (MAP_FAILED == (A = MMAP(M))) {      U = M; }
-    else { Amax = A; Max = M; MUNMAP(A, M); L = M; }
+    if (MAP_FAILED != (A = MMAP(M))) { assert(Max < M); Max = M; Amax = A; 
MUNMAP(A, M); if (UINT64_MAX == M) break; L = M + 1; }
+    else                             { assert(0   < M);                        
                                      U = M - 1; }
   }
   FYI("max gap: %zu bytes at %p\n", Max, Amax);
   if (Max < N + (size_t)ALGN * 2) {  // safety margin
@@ -396,6 +405,7 @@ int pma_init(int verbose, const char *file) {
   assert((himask | lomask) == ~((uintptr_t)0));
   if (! (WDSZ == sizeof(void *) && // in C11 we'd static_assert()
          WDSZ == sizeof(size_t) &&
+         WDSZ == sizeof(off_t)  &&
          WDSZ == sizeof(unsigned long))) { ERR("word size not 64 bits\n"); 
SERL; }
   assert(0 == sizeof(pma_hdr_t) % WDSZ);
   if (NULL == file) {
diff --git a/support/pma.h b/support/pma.h
index 29263ae6..96b450f2 100644
--- a/support/pma.h
+++ b/support/pma.h
@@ -23,7 +23,7 @@
 #define PMA_H_INCLUDED
 
 // version strings of interface and implementation should match
-#define PMA_H_VERSION "2022.08Aug.03.1659520468 (Avon 7-g1)"
+#define PMA_H_VERSION "2022.10Oct.30.1667172241 (Avon 8-g1)"
 extern const char pma_version[];
 
 /* May contain line number in pma.c where something went wrong if one

-----------------------------------------------------------------------

Summary of changes:
 configure         | 20 ++++++++++----------
 configure.ac      |  2 +-
 support/ChangeLog |  4 ++++
 support/pma.c     | 32 +++++++++++++++++++++-----------
 support/pma.h     |  2 +-
 5 files changed, 37 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]