From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23058 invoked from network); 12 Mar 2004 18:59:16 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Mar 2004 18:59:16 -0000 Received: (qmail 23801 invoked by alias); 12 Mar 2004 18:58:47 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7160 Received: (qmail 23788 invoked from network); 12 Mar 2004 18:58:46 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 12 Mar 2004 18:58:46 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.58.19] by sunsite.dk (MessageWall 1.0.8) with SMTP; 12 Mar 2004 18:58:46 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i2CIwkv06135 for ; Fri, 12 Mar 2004 18:58:46 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Fri, 12 Mar 2004 18:58:25 +0000 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 12 Mar 2004 19:00:48 +0000 To: zsh-users@sunsite.dk (Zsh users list) Subject: Re: 4.2.0-pre-4 In-reply-to: "Peter Stephenson"'s message of "Fri, 12 Mar 2004 17:23:01 GMT." <1087.1079112181@csr.com> Date: Fri, 12 Mar 2004 18:58:46 +0000 Message-ID: <18540.1079117926@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 12 Mar 2004 19:00:48.0535 (UTC) FILETIME=[54C7D270:01C40864] 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 () { + 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 () { + 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 Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************