sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Ismael Luceno (eefe6267df634fcd1c822b52931390d7423e9e78)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (eefe6267df634fcd1c822b52931390d7423e9e78)
- Date: Wed, 3 Dec 2014 15:59:46 -0600
GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:
devel/mawk/DETAILS | 1 +
devel/mawk/HISTORY | 2 ++
devel/mawk/PRE_BUILD | 3 +++
devel/mawk/patches/nextfile-fix.patch | 25 +++++++++++++++++++++++++
4 files changed, 31 insertions(+)
New commits:
commit eefe6267df634fcd1c822b52931390d7423e9e78
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
mawk: Nextfile statement implementation fix
diff --git a/devel/mawk/DETAILS b/devel/mawk/DETAILS
index 5cfb342..c651066 100755
--- a/devel/mawk/DETAILS
+++ b/devel/mawk/DETAILS
@@ -1,5 +1,6 @@
SPELL=mawk
VERSION=1.3.4-20141027
+ PATCHLEVEL=1
SOURCE="${SPELL}-${VERSION}.tgz"
SOURCE_URL[0]=ftp://invisible-island.net/${SPELL}/${SOURCE}
SOURCE_HASH=sha512:6a16f34f8749c42ed4b008e1229718673309041c926ce96cf1739b191af39f5ca6713ca0cfc70bbd86d6f17630c6ca3d5f04c84bede94d2d9469fdac40f38eab
diff --git a/devel/mawk/HISTORY b/devel/mawk/HISTORY
index b0f6329..773d1eb 100644
--- a/devel/mawk/HISTORY
+++ b/devel/mawk/HISTORY
@@ -1,5 +1,7 @@
2014-12-03 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 1.3.4-20141027
+ * PRE_BUILD, patches/nextfile-fix.patch: Nextfile statement
+ implementation fix
2014-09-09 Ismael Luceno <ismael AT sourcemage.org>
* PROVIDES: Provide AWK
diff --git a/devel/mawk/PRE_BUILD b/devel/mawk/PRE_BUILD
new file mode 100755
index 0000000..1fec4be
--- /dev/null
+++ b/devel/mawk/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+find "$SPELL_DIRECTORY/patches" -name '*.patch' -exec patch -p1 -i '{}' \;
diff --git a/devel/mawk/patches/nextfile-fix.patch
b/devel/mawk/patches/nextfile-fix.patch
new file mode 100644
index 0000000..82fb848
--- /dev/null
+++ b/devel/mawk/patches/nextfile-fix.patch
@@ -0,0 +1,25 @@
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Wed, 3 Dec 2014 16:41:29 -0300
+Subject: [mawk PATCH] Fix implementation of nextfile statement
+
+Mawk behaves incorrectly when using the nextfile statement. It marks the
+file as dead, but does not check such state and thus ends reading from
+a closed fd.
+
+The problem is fixed by simulating an EOF.
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ fin.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fin.c
++++ b/fin.c
+@@ -189,6 +189,7 @@
+ close(fin->fd);
+ }
+
++ fin->flags |= EOF_FLAG;
+ fin->limit =
+ fin->buff =
+ fin->buffp = &dead; /* marks it semi_closed */
- [SM-Commit] GIT changes to master grimoire by Ismael Luceno (eefe6267df634fcd1c822b52931390d7423e9e78), Ismael Luceno, 12/03/2014
Archive powered by MHonArc 2.6.24.