From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25335 invoked from network); 13 Dec 1998 04:30:41 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 13 Dec 1998 04:30:41 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id XAA11409; Sat, 12 Dec 1998 23:29:27 -0500 (EST) Resent-Date: Sat, 12 Dec 1998 23:29:27 -0500 (EST) From: "Bart Schaefer" Message-Id: <981212202814.ZM6867@candle.brasslantern.com> Date: Sat, 12 Dec 1998 20:28:14 -0800 X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu Subject: PATCH: 3.1.5 + Sven's dynamic conditionals: Fix non-dynamic build MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"xVgPP1.0.9o2.cAqSs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4762 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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