Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PATCH: more dynamic loading on AIX

0 views
Skip to first unread message

Peter Stephenson

unread,
May 8, 1998, 3:00:00 AM5/8/98
to Zsh hackers list

p...@ibmth.df.unipi.it wrote:
> 3) I made comp1 and zle builtin, mainly as an act of cowardice after
> my experience with IRIX, but even so loading compctl or deltochar
> causes a core dump.

`Even so' seems to be an exaggeration. I've recompiled with
everything including comp1 and zle as loadable modules and everything
is fine. There must be something confusing it into thinking that zle
should be a separately loaded library even though it isn't, so that
calls into zle don't work.

--
Peter Stephenson <p...@ifh.de> Tel: +39 50 844536
WWW: http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy


hz...@austin.ibm.com

unread,
May 8, 1998, 3:00:00 AM5/8/98
to p...@ibmth.df.unipi.it

p...@ibmth.df.unipi.it wrote:
> 1) module.c was trying to include <link.h>. This doesn't exist here
> under AIX 3.2, nor does it seem to be there on a 4.1 system at the
> other end of Europe. If it's sometimes necessary, it should probably
> be tested for in configure.

That link.h include was in the else branch of #ifdef AIXDYNAMIC, so it
seems that something was wrong in your build process.

> 2) AIXDYNAMIC was missing from config.h.in and so didn't appear in
> config.h. I am correct that config.h.in needs to be updated by hand,
> not by autoconf?

You should run autoheader. I did try this on a very ancient AIX 3.2
box (configure says AIX 3.2 not even 3.2.5, that 3.2 is full of bugs
and broken things). It did work. All of your problems should go away
if you run autoheader and rerun configure and make.

Zoli


p...@ibmth.df.unipi.it

unread,
May 8, 1998, 3:00:00 AM5/8/98
to zsh-w...@math.gatech.edu

hz...@cs.elte.hu wrote:
> The patch below implements dynamic loading on AIX.

This is a good thing to have. I tried it, and encountered the
following problems

1) module.c was trying to include <link.h>. This doesn't exist here
under AIX 3.2, nor does it seem to be there on a 4.1 system at the
other end of Europe. If it's sometimes necessary, it should probably
be tested for in configure.

2) AIXDYNAMIC was missing from config.h.in and so didn't appear in


config.h. I am correct that config.h.in needs to be updated by hand,
not by autoconf?

3) I made comp1 and zle builtin, mainly as an act of cowardice after


my experience with IRIX, but even so loading compctl or deltochar

causes a core dump. As far as I can see, it seems to be happening
when trying to call init_module(), which is special for the AIX
version. Recompiling with compctl also builtin seems to work.
On the other hand, the remaining libraries (stat, file, ...) work fine
dynamically. Any ideas?

Here's the simplest possible patch for the first two.

*** Src/module.c.aix Fri May 8 11:53:19 1998
--- Src/module.c Fri May 8 11:53:38 1998
***************
*** 204,210 ****
#else
# include <sys/types.h>
# include <nlist.h>
- # include <link.h>
#endif
#ifndef HAVE_DLCLOSE
# define dlclose(X) ((X), 0)
--- 204,209 ----
*** config.h.in.aix Fri May 8 11:53:11 1998
--- config.h.in Fri May 8 11:53:21 1998
***************
*** 256,261 ****
--- 256,264 ----
/* Define to 1 if you want to use dynamically loaded modules */
#undef DYNAMIC

+ /* Define to 1 if you want to use dynamically loaded modules on AIX */
+ #undef AIXDYNAMIC
+
/* Define if you have the cap_init function. */
#undef HAVE_CAP_INIT

--
Peter Stephenson <p...@ibmth.df.unipi.it> Tel: +39 50 844536

0 new messages