Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Latest patched development version



Bruce Stephens wrote:
> Undefined                       first referenced
>  symbol                             in file
> wrappers                            exec.o
> unload_module                       exec.o

It's the problem Bart was complaining about when you compile without
dynamic loading.  The following will fix this; I have updated
http://www.ifh.de/~pws/computing/zsh-3.1.5-pws-3.tar.gz
as well. (I have now successfully compiled this statically linked, so
after this you're on your own :-).)

The module.c chunk may well be my fault, since I moved Sven's bits
around to fit in with AIXDYNAMIC --- hence this chunk is not relevant
if you are building your own 3.1.5 patched version.  For the exec.c
part, Sven will have to decide eventually where the #ifdef DYNAMIC
should really go, but this does not currently affect use of the shell
at all so anyone trying to get this version to compile doesn't need to
worry about that.

*** Src/exec.c.wrap	Mon Dec 14 18:05:02 1998
--- Src/exec.c	Mon Dec 14 18:03:12 1998
***************
*** 2777,2786 ****
--- 2777,2788 ----
  	wrap->count--;
  	if (!wrap->count) {
  	    wrap->module->flags &= ~MOD_WRAPPER;
+ #ifdef DYNAMIC
  	    if (wrap->module->flags & MOD_UNLOAD) {
  		wrap->module->flags &= ~MOD_UNLOAD;
  		unload_module(wrap->module, NULL);
  	    }
+ #endif
  	}
  	if (!cont)
  	    return;
*** Src/module.c.wrap	Mon Dec 14 18:05:23 1998
--- Src/module.c	Mon Dec 14 18:04:27 1998
***************
*** 90,95 ****
--- 90,124 ----
      return hadf ? hads : 1;
  }
  
+ /* The list of function wrappers defined. */
+ 
+ /**/
+ FuncWrap wrappers;
+ 
+ /* This adds a definition for a wrapper. Return value is one in case of *
+  * error and zero if all went fine. */
+ 
+ /**/
+ int
+ addwrapper(Module m, FuncWrap w)
+ {
+     FuncWrap p, q;
+ 
+     if (w->flags & WRAPF_ADDED)
+ 	return 1;
+     for (p = wrappers, q = NULL; p; q = p, p = p->next);
+     if (q)
+ 	q->next = w;
+     else
+ 	wrappers = w;
+     w->next = NULL;
+     w->flags |= WRAPF_ADDED;
+     w->module = m;
+     w->count = 0;
+ 
+     return 0;
+ }
+ 
  #ifdef DYNAMIC
  
  /* $module_path ($MODULE_PATH) */
***************
*** 159,193 ****
  	b->flags &= ~BINF_ADDED;
      }
      return hadf ? hads : 1;
- }
-   
- /* The list of function wrappers defined. */
- 
- /**/
- FuncWrap wrappers;
- 
- /* This adds a definition for a wrapper. Return value is one in case of *
-  * error and zero if all went fine. */
- 
- /**/
- int
- addwrapper(Module m, FuncWrap w)
- {
-     FuncWrap p, q;
- 
-     if (w->flags & WRAPF_ADDED)
- 	return 1;
-     for (p = wrappers, q = NULL; p; q = p, p = p->next);
-     if (q)
- 	q->next = w;
-     else
- 	wrappers = w;
-     w->next = NULL;
-     w->flags |= WRAPF_ADDED;
-     w->module = m;
-     w->count = 0;
- 
-     return 0;
  }
  
  /* This removes the given wrapper definition from the list. Returned is *
--- 188,193 ----

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author