summary refs log tree commit diff
path: root/src/var.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/var.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/var.c b/src/var.c
index ecc8c90..027beff 100644
--- a/src/var.c
+++ b/src/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;