Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: 3.1.5 + Sven's dynamic conditionals: Fix non-dynamic build
- X-seq: zsh-workers 4762
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: PATCH: 3.1.5 + Sven's dynamic conditionals: Fix non-dynamic build
- Date: Sat, 12 Dec 1998 20:28:14 -0800
The condtab global and the function getconddef() were undefined unless zsh
was compiled with -DDYNAMIC. I believe this is the correct fix to make the
--disable-dynamic build work again.
People making modules patches: PLEASE compile with --disable-dynamic as
well as --enable-dynamic before you post!
Index: Src/module.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Src/module.c,v
retrieving revision 1.2
diff -u -r1.2 module.c
--- module.c 1998/12/11 12:09:50 1.2
+++ module.c 1998/12/13 04:24:10
@@ -161,6 +161,8 @@
return hadf ? hads : 1;
}
+#endif /* DYNAMIC */
+
/* The list of module-defined conditions. */
/**/
@@ -175,7 +177,9 @@
getconddef(int inf, char *name, int autol)
{
Conddef p;
+#ifdef DYNAMIC
int f = 1;
+#endif
do {
for (p = condtab; p; p = p->next) {
@@ -183,6 +187,7 @@
!strcmp(name, p->name))
break;
}
+#ifdef DYNAMIC
if (autol && p && p->module) {
/* This is a definition for an autoloaded condition, load the *
* module if we haven't tried that already. */
@@ -193,10 +198,13 @@
} else
break;
} else
+#endif
break;
} while (!p);
return p;
}
+
+#ifdef DYNAMIC
/* This adds the given condition definition. The return value is zero on *
* success and 1 on failure. If there is a matching definition for an *
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author