summaryrefslogtreecommitdiffstats
path: root/bin/sh/memalloc.h
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2010-12-12 00:07:27 +0000
committerjilles <jilles@FreeBSD.org>2010-12-12 00:07:27 +0000
commit9daf74d4c87761a7e7ef2d664810944cc789fe26 (patch)
tree66bc541c1c427371757d1d2e2510eb44cbf5cb94 /bin/sh/memalloc.h
parentb173b18025943e9b8fb30f95e8c8ad3161b21b0d (diff)
downloadFreeBSD-src-9daf74d4c87761a7e7ef2d664810944cc789fe26.zip
FreeBSD-src-9daf74d4c87761a7e7ef2d664810944cc789fe26.tar.gz
sh: Remove the herefd hack.
The herefd hack wrote out partial here documents while expanding them. It seems unnecessary complication given that other expansions just allocate memory. It causes bugs because the stack is also used for intermediate results such as arithmetic expressions. Such places should disable herefd for the duration but not all of them do, and I prefer removing the need for disabling herefd to disabling it everywhere needed. Here documents larger than 1024 bytes will use a bit more CPU time and memory. Additionally this allows a later change to expand here documents in the current shell environment. (This is faster for small here documents but also changes behaviour.) Obtained from: dash
Diffstat (limited to 'bin/sh/memalloc.h')
-rw-r--r--bin/sh/memalloc.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/bin/sh/memalloc.h b/bin/sh/memalloc.h
index 88848dd..da23a95 100644
--- a/bin/sh/memalloc.h
+++ b/bin/sh/memalloc.h
@@ -46,7 +46,6 @@ struct stackmark {
extern char *stacknxt;
extern int stacknleft;
extern int sstrnleft;
-extern int herefd;
pointer ckmalloc(size_t);
pointer ckrealloc(pointer, int);
OpenPOWER on IntegriCloud