[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, feature/pma2, updated. gawk-4.1.0-4754-ge3e5bc10
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, feature/pma2, updated. gawk-4.1.0-4754-ge3e5bc10 |
Date: |
Fri, 17 Jun 2022 05:33: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 "gawk".
The branch, feature/pma2 has been updated
via e3e5bc101641ceda429d8d98b1558dcc8aad5b0b (commit)
from c187096f20b78631fc991898e4db62c5d6a6a441 (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=e3e5bc101641ceda429d8d98b1558dcc8aad5b0b
commit e3e5bc101641ceda429d8d98b1558dcc8aad5b0b
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Fri Jun 17 12:33:08 2022 +0300
Updates to pma for portability.
diff --git a/support/ChangeLog b/support/ChangeLog
index 59bff5be..be0b0fac 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,12 @@
+2022-06-17 Arnold D. Robbins <arnold@skeeve.com>
+
+ * pma.h (PMA_H_VERSION): Add "+ gawk" to the version string.
+ * pma.c (pma_version): Ditto.
+ (PGSZ): Now a variable, assigned equal to sysconf(_SC_PAGESIZE).
+ Allows portability to Cygwin.
+ (pma_init): Remove no-longer-used `ps' variable. Remove check
+ of PGSZ against sysconf(_SC_PAGESIZE).
+
2022-06-09 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (libsupport_a_SOURCES): Add pma.c if we
diff --git a/support/pma.c b/support/pma.c
index d769bb0e..da4d0b9a 100644
--- a/support/pma.c
+++ b/support/pma.c
@@ -41,7 +41,7 @@
#include "pma.h"
// Software version; not the same as backing file format version.
-const char pma_version[] = "2022.05May.01 (Avon 5)";
+const char pma_version[] = "2022.05May.01 (Avon 5) + gawk";
#define S(s) #s
#define S2(s) S(s)
@@ -61,11 +61,12 @@ int pma_errno;
enum {
VERS = 2, // backing file format version number
- PGSZ = 4096, // page size (bytes)
WDSZ = 8, // word size (bytes)
NFL = 422 // number of free lists / size classes
};
+static int PGSZ; // can vary per system and even dynamically
+
typedef struct ao { // alloc object
struct ao *anext, // header; singly linked list of all aos in addr
order
*fprev, *fnext; // for doubly linked free list
@@ -367,7 +368,7 @@ static void * addrgap(off_t n) { // find big gap in
address space to map n byte
#define MM(a,s,f) mmap((a), (size_t)(s), PROT_READ | PROT_WRITE, MAP_SHARED,
(f), 0)
int pma_init(int verbose, const char *file) {
- int fd; long ps; void *a1, *a2; size_t as = sizeof(a1); struct stat s;
+ int fd; void *a1, *a2; size_t as = sizeof(a1); struct stat s;
pma_hdr_t *h;
assert(0 <= verbose && 3 >= verbose);
state.vrb = verbose;
@@ -381,10 +382,8 @@ int pma_init(int verbose, const char *file) {
assert(WDSZ == sizeof(size_t));
assert(WDSZ == sizeof(unsigned long));
assert(0 == sizeof(pma_hdr_t) % WDSZ);
- if (PGSZ != (ps = sysconf(_SC_PAGESIZE))) {
- ERR("bad page size %ld\n", ps);
- SERL;
- }
+
+ PGSZ = sysconf(_SC_PAGESIZE);
if (NULL == file) {
WRN("no backing file provided; falling back on standard malloc\n");
state.init = 2;
diff --git a/support/pma.h b/support/pma.h
index 0a9859c4..f5851d96 100644
--- a/support/pma.h
+++ b/support/pma.h
@@ -20,7 +20,7 @@
#define PMA_H_INCLUDED
// version strings of interface and implementation should match
-#define PMA_H_VERSION "2022.05May.01 (Avon 5)"
+#define PMA_H_VERSION "2022.05May.01 (Avon 5) + gawk"
extern const char pma_version[];
/* May contain line number in pma.c where something went wrong if one
-----------------------------------------------------------------------
Summary of changes:
support/ChangeLog | 9 +++++++++
support/pma.c | 13 ++++++-------
support/pma.h | 2 +-
3 files changed, 16 insertions(+), 8 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, feature/pma2, updated. gawk-4.1.0-4754-ge3e5bc10,
Arnold Robbins <=