klibc-bot for David S. Miller
2012-Jul-02 09:12 UTC
[klibc] [klibc:master] [SHELL] Allow building without LINEO support
Commit-ID: 4a84d61a24296b8253b3f8f7c86ee28df53e2f3b Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=4a84d61a24296b8253b3f8f7c86ee28df53e2f3b Author: David S. Miller <davem at davemloft.net> AuthorDate: Wed, 17 Aug 2011 09:31:17 +0800 Committer: maximilian attems <max at stro.at> CommitDate: Mon, 2 Jul 2012 10:46:37 +0200 [klibc] [SHELL] Allow building without LINEO support Simply specify --disable-lineno to configure. Signed-off-by: David S. Miller <davem at davemloft.net> Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: maximilian attems <max at stro.at> --- usr/dash/var.c | 4 ++++ usr/dash/var.h | 6 ++++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/usr/dash/var.c b/usr/dash/var.c index ecc8c90..027beff 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -101,7 +101,9 @@ struct var varinit[] = { { 0, VSTRFIXED|VTEXTFIXED, "PS2=> ", 0 }, { 0, VSTRFIXED|VTEXTFIXED, "PS4=+ ", 0 }, { 0, VSTRFIXED|VTEXTFIXED, "OPTIND=1", getoptsreset }, +#ifdef WITH_LINENO { 0, VSTRFIXED|VTEXTFIXED, linenovar, 0 }, +#endif #ifndef SMALL { 0, VSTRFIXED|VTEXTFIXED|VUNSET, "TERM\0", 0 }, { 0, VSTRFIXED|VTEXTFIXED|VUNSET, "HISTSIZE\0", sethistsize }, @@ -335,9 +337,11 @@ lookupvar(const char *name) struct var *v; if ((v = *findvar(hashvar(name), name)) && !(v->flags & VUNSET)) { +#ifdef WITH_LINENO if (v == &vlineno && v->text == linenovar) { fmtstr(linenovar+7, sizeof(linenovar)-7, "%d", lineno); } +#endif return strchrnul(v->text, '=') + 1; } return NULL; diff --git a/usr/dash/var.h b/usr/dash/var.h index 4c02eb2..1a06a3c 100644 --- a/usr/dash/var.h +++ b/usr/dash/var.h @@ -88,9 +88,15 @@ extern struct var varinit[]; #define vps2 (&vps1)[1] #define vps4 (&vps2)[1] #define voptind (&vps4)[1] +#ifdef WITH_LINENO #define vlineno (&voptind)[1] +#endif #ifndef SMALL +#ifdef WITH_LINENO #define vterm (&vlineno)[1] +#else +#define vterm (&voptind)[1] +#endif #define vhistsize (&vterm)[1] #endif
Possibly Parallel Threads
- [klibc:update-dash] [VAR] Use setvareq to set OPTIND initially
- [klibc:update-dash] dash: [VAR] Use setvareq to set OPTIND initially
- [klibc:update-dash] dash: var: Set IFS to fixed value at start time
- [klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
- [klibc:master] dash: sync with latest git