Fix gawk API version number as per upstream

This commit is contained in:
Andrew J. Schorr 2019-07-11 17:50:09 +00:00 committed by Jakub Martisko
parent 99a8b8e211
commit 637e5fecca
2 changed files with 58 additions and 1 deletions

53
gawk-api-version.patch Normal file
View File

@ -0,0 +1,53 @@
From ae1139c068702ede2d35002bdd14199a2c9eb4d8 Mon Sep 17 00:00:00 2001
From: "Andrew J. Schorr" <aschorr@telemetry-investments.com>
Date: Mon, 8 Jul 2019 09:25:01 -0400
Subject: [PATCH] Bump gawk_api_major_version due to incompatible namespace
changes.
---
ChangeLog | 8 ++++++++
gawkapi.h | 5 ++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 31bb6a5..9dda704 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-07-08 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * gawkapi.h (gawk_api_major_version): Bump from 2 to 3 because the
+ namespace changes altered the function signatures in gawk_api_t.
+ And add a comment at the top of the structure with a reminder that
+ the version number should be bumped whenever the struct is altered
+ in any way.
+
2019-06-26 Arnold D. Robbins <arnold@skeeve.com>
* symbol.c (install): Strip off any leading `awk::' before
diff --git a/gawkapi.h b/gawkapi.h
index 3db8990..9d9cf87 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -296,7 +296,7 @@ typedef struct awk_two_way_processor {
awk_const struct awk_two_way_processor *awk_const next; /* for use by gawk */
} awk_two_way_processor_t;
-#define gawk_api_major_version 2
+#define gawk_api_major_version 3
#define gawk_api_minor_version 0
/* Current version of the API. */
@@ -458,6 +458,9 @@ typedef void *awk_ext_id_t; /* opaque type for extension id */
/*
* The API into gawk. Lots of functions here. We hope that they are
* logically organized.
+ *
+ * !!! If you make any changes to this structure, please remember to bump !!!
+ * !!! gawk_api_major_version and/or gawk_api_minor_version. !!!
*/
typedef struct gawk_api {
/* First, data fields. */
--
1.8.3.1

View File

@ -44,7 +44,7 @@
Name: gawk
Summary: The GNU version of the AWK text processing utility
Version: 5.0.1
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3+ and GPLv2+ and LGPLv2+ and BSD
@ -120,6 +120,7 @@ Patch005: gawk-inplace-namespace-part1.patch
Patch006: gawk-inplace-namespace-part2.patch
#Parts of the patch dealing with .info files, were removed, some parts of documentation might be broken
Patch007: gawk-inplace-namespace-part3.patch
Patch008: gawk-api-version.patch
@ -277,6 +278,9 @@ install -m 0644 -p doc/gawkinet.{pdf,ps} %{buildroot}%{_docdir}/%{name}
# =============================================================================
%changelog
* Thu Jul 11 2019 Andrew Schorr <ajschorr@fedoraproject.org> - 5.0.10-3
- Add upstream patch to fix the API version number
* Thu Jun 27 2019 Jakub Martisko <jamartis@redhat.com> - 5.0.1-2
- Fix the bacward compatibility of the inplace extension
- (renaming of some variables due to introduction of namespaces)