zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Small fix for dynamic loading on IRIX 5.3
@ 1999-01-09 14:37 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 1999-01-09 14:37 UTC (permalink / raw)
  To: zsh-workers

When trying to compile zsh (either 3.1.5 or 3.1.5-pws-4) with dynamic
loading enabled on IRIX 5.3, I found that the dynamic code was not
being compiled despite the fact that it has worked well with previous
versions. I traced this down to the following line in configure:

checking if static/shared library linking is broken... yes
config.log showed the problem as:

configure:4642: checking if static/shared library linking is broken
cfe: Error: conftest1.c, line 5: Too many initial values for 'symlist1'
                (void *)0
                ^
Anyway, the problem is the section of code in aczsh.m4 for conftest1.c:
        extern char **environ;
        void *symlist1[] = {
                (void *)&environ,
                (void *)0
        };

The '[]' is being lost by autoconf so that the line of code in the
configure script appears as just:
        void *symlist1 = {
and SGI's compiler doesn't like this. With the correct conftest1/2
files compiled, the test would pass.

If I'm not mistaken, this is because autoconf sets [ and ] to be the m4
quoting characters. The fix is to use [[]]. I have attached a small
patch which fixes this (although you'll probably find it easier to redo
the change manually).

Oliver Kiddle

*** aczsh.m4	Fri Dec 18 08:48:01 1998
--- aczsh.m4	Sat Jan  9 14:22:32 1999
***************
*** 45,51 ****
  fi
  echo '
  	extern char **environ;
! 	void *symlist1[] = {
  		(void *)&environ,
  		(void *)0
  	};
--- 45,51 ----
  fi
  echo '
  	extern char **environ;
! 	void *symlist1[[]] = {
  		(void *)&environ,
  		(void *)0
  	};


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-01-09 15:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-09 14:37 PATCH: Small fix for dynamic loading on IRIX 5.3 Oliver Kiddle

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).