zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-workers@math.gatech.edu
Subject: PATCH: 3.1.5 + Sven's dynamic conditionals: Fix non-dynamic build
Date: Sat, 12 Dec 1998 20:28:14 -0800	[thread overview]
Message-ID: <981212202814.ZM6867@candle.brasslantern.com> (raw)

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


                 reply	other threads:[~1998-12-13  4:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=981212202814.ZM6867@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).