summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2019-05-09 11:32:36 +0000
committerleot <leot@pkgsrc.org>2019-05-09 11:32:36 +0000
commita2ed434fec71c1a745094461288ed71b56303087 (patch)
treeb8f97fbaaca7a586fa173cf589416e2c524e7520 /shells
parentfe7e839e584e389df9bc6d67bd61e71cf4bd7b94 (diff)
downloadpkgsrc-a2ed434fec71c1a745094461288ed71b56303087.tar.gz
{standalone-,static-,}tcsh: Update to 6.21.00
pkgsrc changes: - Add patch-nls_Makefile.in to avoid +x bit in *.cat files - Remove no longer needed patches (all applied upstream): patch-ed.chared.c, patch-ed.inputl.c, patch-nls-catgen, patch-sh.func.c, patch-tw.init.c Changes: V6.21.00 - 20190508 ------------------- - Abort history loading on words and lines too long https://bugzilla.redhat.com/show_bug.cgi?id=1598502 - PR/37: Introduce GetCmdChar() to avoid open coding array access. make closem() not close sockets so as not to affect nss_ldap. tcsh never creates sockets so that's ok (Miloslav Trmac) - PR/597: Make rmstar work with aliased rm - convert match() from recursive to backtracking. - Handle 8 bit characters in bindkey (Werner Fink) - Look for tgetent in libtinfo as well (Werner Fink) - Don't play pointer tricks that are undefined in modern c (Brooks Davis) - Fix out of bounds read (Brooks Davis) - Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar) - PR/471: Delay arginp parsing ok <kim>, thanks!
Diffstat (limited to 'shells')
-rw-r--r--shells/standalone-tcsh/Makefile4
-rw-r--r--shells/static-tcsh/Makefile4
-rw-r--r--shells/tcsh/Makefile6
-rw-r--r--shells/tcsh/distinfo18
-rw-r--r--shells/tcsh/patches/patch-aa14
-rw-r--r--shells/tcsh/patches/patch-ed.chared.c22
-rw-r--r--shells/tcsh/patches/patch-ed.inputl.c35
-rw-r--r--shells/tcsh/patches/patch-nls-catgen23
-rw-r--r--shells/tcsh/patches/patch-nls_Makefile.in123
-rw-r--r--shells/tcsh/patches/patch-sh.func.c34
-rw-r--r--shells/tcsh/patches/patch-tw.init.c23
11 files changed, 140 insertions, 166 deletions
diff --git a/shells/standalone-tcsh/Makefile b/shells/standalone-tcsh/Makefile
index 7376e34ef88..d65aff941c7 100644
--- a/shells/standalone-tcsh/Makefile
+++ b/shells/standalone-tcsh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2017/08/23 17:52:47 jlam Exp $
+# $NetBSD: Makefile,v 1.29 2019/05/09 11:32:36 leot Exp $
#
# FIXME: This is because of PREFIX=/ below.
@@ -6,7 +6,7 @@ CHECK_FILES_SUPPORTED= no
NOT_FOR_UNPRIVILEGED= yes
PKGNAME= standalone-${DISTNAME}
-PKGREVISION= 2 # ALWAYS needs to be set; 0 if none.
+PKGREVISION= 0 # ALWAYS needs to be set; 0 if none.
WRKSRC= ${WRKDIR}/${DISTNAME}
PATCHDIR= ${.CURDIR}/../../shells/tcsh/patches
diff --git a/shells/static-tcsh/Makefile b/shells/static-tcsh/Makefile
index ddea5b607a7..6fe8d7bb44e 100644
--- a/shells/static-tcsh/Makefile
+++ b/shells/static-tcsh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2017/08/23 17:52:59 jlam Exp $
+# $NetBSD: Makefile,v 1.11 2019/05/09 11:32:36 leot Exp $
#
MAINTAINER= agc@NetBSD.org
@@ -11,7 +11,7 @@ DESCR_SRC= ${.CURDIR}/../../shells/tcsh/DESCR ${.CURDIR}/DESCR
CONFLICTS= tcsh-[0-9]*
PKGNAME= static-${DISTNAME}
-PKGREVISION= 3 # ALWAYS needs to be set; 0 if none.
+PKGREVISION= 0 # ALWAYS needs to be set; 0 if none.
# SunOS 5.10 stopped shipping static libraries.
NOT_FOR_PLATFORM+= SunOS-5.1[0-9]-*
diff --git a/shells/tcsh/Makefile b/shells/tcsh/Makefile
index 0a9df420480..7493bb1331b 100644
--- a/shells/tcsh/Makefile
+++ b/shells/tcsh/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.87 2017/09/04 18:01:01 wiz Exp $
+# $NetBSD: Makefile,v 1.88 2019/05/09 11:32:36 leot Exp $
#
# used by shells/standalone-tcsh/Makefile
# used by shells/static-tcsh/Makefile
-DISTNAME= tcsh-6.20.00
-PKGREVISION?= 2 # use ?= to allow for overrides.
+DISTNAME= tcsh-6.21.00
+PKGREVISION?= 0 # use ?= to allow for overrides.
CATEGORIES= shells
MASTER_SITES= ftp://ftp.astron.com/pub/tcsh/
MASTER_SITES+= ftp://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/
diff --git a/shells/tcsh/distinfo b/shells/tcsh/distinfo
index b8cb0dab821..a1c8163de59 100644
--- a/shells/tcsh/distinfo
+++ b/shells/tcsh/distinfo
@@ -1,15 +1,11 @@
-$NetBSD: distinfo,v 1.39 2017/02/17 19:21:44 he Exp $
+$NetBSD: distinfo,v 1.40 2019/05/09 11:32:36 leot Exp $
-SHA1 (tcsh-6.20.00.tar.gz) = a77d68434cc4bed731a46a39b9e01523e3a1e98c
-RMD160 (tcsh-6.20.00.tar.gz) = 3f119421ef3500cea1bebe2edf35c6d81ca1c8f3
-SHA512 (tcsh-6.20.00.tar.gz) = c5635393c22341e62fb9a0b953ddf8871a876ab09deb08c98237f93afa9257b4a3381d1db65eefe769e22ef845db29ab7bc78773f1f609d73c8205689a6683e9
-Size (tcsh-6.20.00.tar.gz) = 1001696 bytes
-SHA1 (patch-aa) = 440849534fc49afdbd70b95d6cbc62ff5abee240
+SHA1 (tcsh-6.21.00.tar.gz) = aeb43ee952d47bdf33cc29fdecd170cfedbe8481
+RMD160 (tcsh-6.21.00.tar.gz) = 665d522ded31e3fa23b71a5726d2d52e1c60e085
+SHA512 (tcsh-6.21.00.tar.gz) = d7f46588a35b9cd01cfa33d0f9bbae09e9692605b5c045c2b58e66dba958ab904ddfe45aa7361767034e6cc03a34ad9ba4d14fa836df723bade29f3f6a18a46c
+Size (tcsh-6.21.00.tar.gz) = 1001909 bytes
+SHA1 (patch-aa) = 6ec2bcee6029e733743a73d267aa51bfcc898843
SHA1 (patch-ab) = 8cf26988778b5331360eb1aab98bfcc920c71ac2
SHA1 (patch-configure) = 91c2019da8c074bd6f24b84bf798ccd497110727
-SHA1 (patch-ed.chared.c) = d26ba00afcba958b5bb1efc2171e6211c8a5f964
-SHA1 (patch-ed.inputl.c) = d91c55ba297fcbe69f09b1ab3a7b50b9d83114c3
-SHA1 (patch-nls-catgen) = fe5da1ea0edfcb646bcc271e614f5075afa56c60
-SHA1 (patch-sh.func.c) = 030a2647930300f96147715ae17ab95c79ca8ca2
+SHA1 (patch-nls_Makefile.in) = 58d859e8a50e6436b9bc6514497eb876426d92d7
SHA1 (patch-sh.h) = ac6211ddd5e552e9baec2d35aed5e7e573cab04e
-SHA1 (patch-tw.init.c) = 4ed0f6632e149d8badcb8338817af5f9095e34b4
diff --git a/shells/tcsh/patches/patch-aa b/shells/tcsh/patches/patch-aa
index abd71905581..381d90eb281 100644
--- a/shells/tcsh/patches/patch-aa
+++ b/shells/tcsh/patches/patch-aa
@@ -1,6 +1,7 @@
-$NetBSD: patch-aa,v 1.15 2016/11/24 15:45:06 christos Exp $
+$NetBSD: patch-aa,v 1.16 2019/05/09 11:32:36 leot Exp $
-Use LDFLAGS and BSD_INSTALL_*.
+- Adjust mandir
+- Use BSD_INSTALL_*
--- Makefile.in.orig 2015-08-24 16:09:04.000000000 -0400
+++ Makefile.in 2016-11-24 10:43:07.000000000 -0500
@@ -13,15 +14,6 @@ Use LDFLAGS and BSD_INSTALL_*.
MANSECT=1
DESTBIN=${DESTDIR}${bindir}
DESTMAN=${DESTDIR}${mandir}/man${MANSECT}
-@@ -449,7 +449,7 @@
-
- gethost: gethost.c sh.err.h tc.const.h sh.h
- rm -f gethost
-- ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c
-+ ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $(srcdir)/gethost.c
-
- tc.defs.c: gethost host.defs
- @rm -f $@.tmp
@@ -597,19 +597,13 @@
-strip ${DESTBIN}/tcsh$(EXEEXT)
diff --git a/shells/tcsh/patches/patch-ed.chared.c b/shells/tcsh/patches/patch-ed.chared.c
deleted file mode 100644
index 965eda5e010..00000000000
--- a/shells/tcsh/patches/patch-ed.chared.c
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ed.chared.c,v 1.1 2016/12/24 13:18:43 kim Exp $
-
-Fix out of bounds read (Brooks Davis)
-(reproduce by starting tcsh and hitting tab at the prompt)
-
-Index: ed.chared.c
-===================================================================
-RCS file: /p/tcsh/cvsroot/tcsh/ed.chared.c,v
-retrieving revision 3.103
-retrieving revision 3.104
-diff -u -r3.103 -r3.104
---- ed.chared.c 19 Aug 2015 14:29:55 -0000 3.103
-+++ ed.chared.c 2 Dec 2016 16:59:28 -0000 3.104
-@@ -750,7 +750,7 @@
- /*
- * If we found a history character, go expand it.
- */
-- if (HIST != '\0' && *p == HIST)
-+ if (p >= InputBuf && HIST != '\0' && *p == HIST)
- nr_exp = c_excl(p);
- else
- nr_exp = 0;
diff --git a/shells/tcsh/patches/patch-ed.inputl.c b/shells/tcsh/patches/patch-ed.inputl.c
deleted file mode 100644
index b8b88a3b35a..00000000000
--- a/shells/tcsh/patches/patch-ed.inputl.c
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-ed.inputl.c,v 1.1 2017/02/17 19:21:44 he Exp $
-
-Add fix from upstream: Unfortunately the AsciiOnly reversion causes
-a SEGV because *ch is used to index in the command array, and now contains
-INVALID_BYTE. Reproduce error with:
- env -i ./tcsh
- <meta>b
-
---- ed.inputl.c.orig 2012-10-19 15:23:32.000000000 +0000
-+++ ed.inputl.c
-@@ -800,13 +800,17 @@ GetNextChar(Char *cp)
- return -1;
- }
- }
-- cbp++;
-- if (normal_mbtowc(cp, cbuf, cbp) == -1) {
-- reset_mbtowc();
-- if (cbp < MB_CUR_MAX)
-- continue; /* Maybe a partial character */
-- /* And drop the following bytes, if any */
-- *cp = (unsigned char)*cbuf | INVALID_BYTE;
-+ if (AsciiOnly) {
-+ *cp = (unsigned char)*cbuf;
-+ } else {
-+ cbp++;
-+ if (normal_mbtowc(cp, cbuf, cbp) == -1) {
-+ reset_mbtowc();
-+ if (cbp < MB_CUR_MAX)
-+ continue; /* Maybe a partial character */
-+ /* And drop the following bytes, if any */
-+ *cp = (unsigned char)*cbuf | INVALID_BYTE;
-+ }
- }
- break;
- }
diff --git a/shells/tcsh/patches/patch-nls-catgen b/shells/tcsh/patches/patch-nls-catgen
deleted file mode 100644
index 261b98a772e..00000000000
--- a/shells/tcsh/patches/patch-nls-catgen
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-nls-catgen,v 1.1 2016/12/24 13:18:43 kim Exp $
-
-use `` instead $() for solaris, bleh.
-
-Index: nls/catgen
-===================================================================
-RCS file: /p/tcsh/cvsroot/tcsh/nls/catgen,v
-retrieving revision 1.4
-retrieving revision 1.5
-diff -u -r1.4 -r1.5
---- nls/catgen 25 Jul 2014 14:45:25 -0000 1.4
-+++ nls/catgen 26 Nov 2016 00:35:37 -0000 1.5
-@@ -13,8 +13,8 @@
- shift
- CHARSET="$1"
- shift
--cat "${CHARSET}" $(sortit "$@") > "$TMP"
-+cat "${CHARSET}" `sortit "$@"` > "$TMP"
-
--echo "$(basename "$OUT" .cat)"
-+echo "`basename "$OUT" .cat`"
- "${GENCAT}" "$OUT" "$TMP"
- exit 0
diff --git a/shells/tcsh/patches/patch-nls_Makefile.in b/shells/tcsh/patches/patch-nls_Makefile.in
new file mode 100644
index 00000000000..10115bccc94
--- /dev/null
+++ b/shells/tcsh/patches/patch-nls_Makefile.in
@@ -0,0 +1,123 @@
+$NetBSD: patch-nls_Makefile.in,v 1.3 2019/05/09 11:32:36 leot Exp $
+
+Use INSTALL_DATA instead of INSTALL to avoid setting executable bits.
+
+--- nls/Makefile.in.orig 2019-05-08 18:39:28.000000000 +0000
++++ nls/Makefile.in
+@@ -4,7 +4,7 @@ CATALOGS= C.cat et.cat finnish.cat frenc
+ italian.cat ja.cat pl.cat russian.cat spanish.cat ukrainian.cat
+ LOCALES= ${CATALOGS:.cat=}
+ GENCAT= @GENCAT@
+-INSTALL= @INSTALL@
++INSTALL_DATA= @INSTALL_DATA@
+ RM?= rm -f
+ VPATH=@srcdir@
+ srcdir=@srcdir@
+@@ -19,7 +19,7 @@ all: ${CATALOGS}
+ INSTALLED+=${localedir}/C/LC_MESSAGES/tcsh.cat
+ ${localedir}/C/LC_MESSAGES/tcsh.cat: C.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ C.cat: ${srcdir}/C/charset ${srcdir}/C/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -27,7 +27,7 @@ C.cat: ${srcdir}/C/charset ${srcdir}/C/*
+ INSTALLED+=${localedir}/et/LC_MESSAGES/tcsh.cat
+ ${localedir}/et/LC_MESSAGES/tcsh.cat: et.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ et.cat: ${srcdir}/et/charset ${srcdir}/et/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -35,7 +35,7 @@ et.cat: ${srcdir}/et/charset ${srcdir}/e
+ INSTALLED+=${localedir}/fi/LC_MESSAGES/tcsh.cat
+ ${localedir}/fi/LC_MESSAGES/tcsh.cat: finnish.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ finnish.cat: ${srcdir}/finnish/charset ${srcdir}/finnish/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -43,7 +43,7 @@ finnish.cat: ${srcdir}/finnish/charset $
+ INSTALLED+=${localedir}/fr/LC_MESSAGES/tcsh.cat
+ ${localedir}/fr/LC_MESSAGES/tcsh.cat: french.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ french.cat: ${srcdir}/french/charset ${srcdir}/french/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -51,7 +51,7 @@ french.cat: ${srcdir}/french/charset ${s
+ INSTALLED+=${localedir}/de/LC_MESSAGES/tcsh.cat
+ ${localedir}/de/LC_MESSAGES/tcsh.cat: german.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ german.cat: ${srcdir}/german/charset ${srcdir}/german/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -59,7 +59,7 @@ german.cat: ${srcdir}/german/charset ${s
+ INSTALLED+=${localedir}/gr/LC_MESSAGES/tcsh.cat
+ ${localedir}/gr/LC_MESSAGES/tcsh.cat: greek.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ greek.cat: ${srcdir}/greek/charset ${srcdir}/greek/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -67,7 +67,7 @@ greek.cat: ${srcdir}/greek/charset ${src
+ INSTALLED+=${localedir}/it/LC_MESSAGES/tcsh.cat
+ ${localedir}/it/LC_MESSAGES/tcsh.cat: italian.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ italian.cat: ${srcdir}/italian/charset ${srcdir}/italian/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -75,7 +75,7 @@ italian.cat: ${srcdir}/italian/charset $
+ INSTALLED+=${localedir}/ja/LC_MESSAGES/tcsh.cat
+ ${localedir}/ja/LC_MESSAGES/tcsh.cat: ja.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ ja.cat: ${srcdir}/ja/charset ${srcdir}/ja/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -83,7 +83,7 @@ ja.cat: ${srcdir}/ja/charset ${srcdir}/j
+ INSTALLED+=${localedir}/pl/LC_MESSAGES/tcsh.cat
+ ${localedir}/pl/LC_MESSAGES/tcsh.cat: pl.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ pl.cat: ${srcdir}/pl/charset ${srcdir}/pl/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -91,7 +91,7 @@ pl.cat: ${srcdir}/pl/charset ${srcdir}/p
+ INSTALLED+=${localedir}/ru/LC_MESSAGES/tcsh.cat
+ ${localedir}/ru/LC_MESSAGES/tcsh.cat: russian.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ russian.cat: ${srcdir}/russian/charset ${srcdir}/russian/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -99,7 +99,7 @@ russian.cat: ${srcdir}/russian/charset $
+ INSTALLED+=${localedir}/es/LC_MESSAGES/tcsh.cat
+ ${localedir}/es/LC_MESSAGES/tcsh.cat: spanish.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ spanish.cat: ${srcdir}/spanish/charset ${srcdir}/spanish/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
+@@ -107,7 +107,7 @@ spanish.cat: ${srcdir}/spanish/charset $
+ INSTALLED+=${localedir}/ru_UA/LC_MESSAGES/tcsh.cat
+ ${localedir}/ru_UA/LC_MESSAGES/tcsh.cat: ukrainian.cat
+ mkdir -p $(@D)
+- $(INSTALL) $> $^ $@
++ $(INSTALL_DATA) $> $^ $@
+
+ ukrainian.cat: ${srcdir}/ukrainian/charset ${srcdir}/ukrainian/*set[0-9]*
+ @${CATGEN} $(GENCAT) $@ $^ $>
diff --git a/shells/tcsh/patches/patch-sh.func.c b/shells/tcsh/patches/patch-sh.func.c
deleted file mode 100644
index 26f0b8524de..00000000000
--- a/shells/tcsh/patches/patch-sh.func.c
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-sh.func.c,v 1.1 2016/12/24 13:18:43 kim Exp $
-
-Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar)
-
-Index: sh.func.c
-===================================================================
-RCS file: /p/tcsh/cvsroot/tcsh/sh.func.c,v
-retrieving revision 3.176
-retrieving revision 3.177
-diff -u -r3.176 -r3.177
---- sh.func.c 18 Oct 2016 17:26:42 -0000 3.176
-+++ sh.func.c 28 Nov 2016 17:14:20 -0000 3.177
-@@ -2734,16 +2734,18 @@
- int
- getYN(const char *prompt)
- {
-- int doit, c;
-+ int doit;
-+ char c;
-+
- xprintf("%s", prompt);
- flush();
-- (void) force_read(SHIN, &c, 1);
-+ (void) force_read(SHIN, &c, sizeof(c));
- /*
- * Perhaps we should use the yesexpr from the
- * actual locale
- */
- doit = (strchr(CGETS(22, 14, "Yy"), c) != NULL);
-- while (c != '\n' && force_read(SHIN, &c, 1) == 1)
-+ while (c != '\n' && force_read(SHIN, &c, sizeof(c)) == sizeof(c))
- continue;
- return doit;
- }
diff --git a/shells/tcsh/patches/patch-tw.init.c b/shells/tcsh/patches/patch-tw.init.c
deleted file mode 100644
index 17995859af8..00000000000
--- a/shells/tcsh/patches/patch-tw.init.c
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-tw.init.c,v 1.1 2016/12/24 13:18:43 kim Exp $
-
-Don't play pointer tricks that are undefined in modern c (Brooks Davis)
-
-Index: tw.init.c
-===================================================================
-RCS file: /p/tcsh/cvsroot/tcsh/tw.init.c,v
-retrieving revision 3.42
-retrieving revision 3.43
-diff -u -r3.42 -r3.43
---- tw.init.c 17 Apr 2011 14:49:30 -0000 3.42
-+++ tw.init.c 7 Dec 2016 02:52:27 -0000 3.43
-@@ -125,9 +125,8 @@
- sl->buff = xrealloc(sl->buff, sl->tbuff * sizeof(Char));
- /* Re-thread the new pointer list, if changed */
- if (ptr != NULL && ptr != sl->buff) {
-- intptr_t offs = sl->buff - ptr;
- for (i = 0; i < sl->nlist; i++)
-- sl->list[i] += offs;
-+ sl->list[i] = sl->buff + (sl->list[i] - ptr);
- }
- disabled_cleanup(&pintr_disabled);
- }