* PATCH: 3.1.5 + Sven's dynamic conditionals: Fix non-dynamic build
@ 1998-12-13 4:28 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 1998-12-13 4:28 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-12-13 4:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-13 4:28 PATCH: 3.1.5 + Sven's dynamic conditionals: Fix non-dynamic build Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).