zsh-users
 help / color / mirror / code / Atom feed
From: Ibraheem Umaru-Mohammed <iumarumo@eidosnet.co.uk>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: 4.2.0-pre-4
Date: Mon, 15 Mar 2004 11:30:57 +0000	[thread overview]
Message-ID: <1079350257.7098.6.camel@sonic> (raw)
In-Reply-To: <18540.1079117926@csr.com>

On Fri, 2004-03-12 at 18:58, Peter Stephenson wrote:
> Peter Stephenson wrote:
> > It ought to be possible to use `nm' on some other system to verify the
> > symbols that need exporting, and hence keep the list up to date, but I
> > don't think I'm going to have time for that.
> 
> I lied.  Should have waited to release 4.2.0-pre-4.  This patch (the
> first two hunks) will probably be needed on AIX.  Sent to zsh-users in
> case it affects anybody downloading that.
> 
> (I'm assuming that stdout@@GLIBC_2.0 don't need exporting...)
> 
> Index: Src/Zle/zle_misc.c
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_misc.c,v
> retrieving revision 1.10
> diff -u -r1.10 zle_misc.c
> --- Src/Zle/zle_misc.c	8 Mar 2004 11:44:14 -0000	1.10
> +++ Src/Zle/zle_misc.c	12 Mar 2004 18:40:07 -0000
> @@ -73,7 +73,7 @@
>  }
>  
>  /**/
> -int
> +mod_export int
>  selfinsertunmeta(char **args)
>  {
>      lastchar &= 0x7f;
> Index: Src/Zle/zle_utils.c
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_utils.c,v
> retrieving revision 1.8
> diff -u -r1.8 zle_utils.c
> --- Src/Zle/zle_utils.c	29 Oct 2003 19:17:48 -0000	1.8
> +++ Src/Zle/zle_utils.c	12 Mar 2004 18:40:07 -0000
> @@ -388,7 +388,7 @@
>   * The message must be metafied.                              */
>  
>  /**/
> -void mod_export
> +mod_export void
>  showmsg(char const *msg)
>  {
>      char const *p;
> Index: Util/check_exports
> ===================================================================
> RCS file: Util/check_exports
> diff -N Util/check_exports
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ Util/check_exports	12 Mar 2004 18:40:07 -0000
> @@ -0,0 +1,64 @@
> +#!/usr/local/bin/perl -w
> +
> +# Attempt to scan executable, libraries, and .export files after
> +# a zsh build to see if all necessary symbols appear in the .export file
> +# (and hence with `mod_export' in the source file).  This keeps AIX happy.
> +# Probably severely system dependent, but known to run on Fedora Core 1,
> +# at least.  Not needed on AIX itself... you can tell if doesn't link.
> +
> +if (! -f "zsh") {
> +    die "Can't file zsh, are we in the Src directory of the build?\n";
> +}
> +
> +my (%defined, %undefined, %exported);
> +
> +foreach my $file ("zsh", glob("*.so */*.so")) {
> +    next unless -f $file;
> +
> +    my $exports = $file;
> +    $exports =~ s/\.so//;
> +    $exports .= ".export";
> +    if (-f $exports) {
> +	open EXPORT, $exports  or  die "Can't read $exports: $!\n";
> +	my $href = $exported{$file} = { };
> +	while (<EXPORT>) {
> +	    next if /^#/;
> +	    chomp;
> +	    $href->{$_} = 1;
> +	}
> +	close EXPORT;
> +    } else {
> +	warn "Hmmm... no .exports file for $file\n";
> +    }
> +
> +    open PIPE, "nm $file |"  or  die "Can't popen nm";
> +    while (<PIPE>) {
> +	s/^[0-9a-f]*\s+//;
> +	my ($type, $sym) = split;
> +	# ignore local symbols (lower case)
> +	if ($type =~ /^[TBAD]/) {
> +	    if (!defined $defined{$sym}) {
> +		$defined{$sym} = $file;
> +	    }
> +	} elsif ($type eq 'U') {
> +	    # could skip undefined from zsh and zsh.so, but what the heck
> +	    my $ref = \$undefined{$sym};
> +	    if (defined $$ref) {
> +		push @$$ref, $file;
> +	    } else {
> +		$$ref = [ $file ];
> +	    }
> +	}
> +    }
> +    close PIPE  or  die "nm failed";
> +}
> +
> +foreach $sym (keys %undefined) {
> +    my $deffile = $defined{$sym};
> +    if (defined $deffile) {
> +	if (!$exported{$deffile}{$sym}) {
> +	    printf "%-20s: %-20s: %s\n", $sym, $defined{$sym},
> +	    join(" ", @{$undefined{$sym}});
> +	}
> +    }
> +}

Peter,

It has all finally compiled on AIX 5.2, and all seems to work correctly.
Thanks for taking the time to look at this - much appreciated.

Cheers,

			--ibraheem. 


  reply	other threads:[~2004-03-15 11:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-12 17:23 4.2.0-pre-4 Peter Stephenson
2004-03-12 18:58 ` 4.2.0-pre-4 Peter Stephenson
2004-03-15 11:30   ` Ibraheem Umaru-Mohammed [this message]
2004-03-15 16:20     ` 4.2.0-pre-4 Peter Stephenson
2004-04-12  1:38 ` zle_thingy.c: variable "modsave" used before its value set Jens Petersen
2004-04-12  9:04   ` Wayne Davison
2004-04-12 15:21     ` Bart Schaefer
2004-04-12 16:22       ` Wayne Davison

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=1079350257.7098.6.camel@sonic \
    --to=iumarumo@eidosnet.co.uk \
    --cc=pws@csr.com \
    --cc=zsh-users@sunsite.dk \
    /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).