Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id AF436635443 for ; Wed, 10 Jun 2009 01:13:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 86003-08 for ; Wed, 10 Jun 2009 01:12:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from alexis.jtlnet.com (alexis.jtlnet.com [69.36.9.81]) by mail.postgresql.org (Postfix) with ESMTP id 4533A6351C5 for ; Wed, 10 Jun 2009 01:12:39 -0300 (ADT) Received: from [192.168.10.103] (cpe-075-177-154-027.nc.res.rr.com [::ffff:75.177.154.27]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) by alexis.jtlnet.com with esmtp; Wed, 10 Jun 2009 00:12:21 -0400 id 0008071B.4A2F32A5.00002F2D Message-ID: <4A2F32A7.2000600@dunslane.net> Date: Wed, 10 Jun 2009 00:12:23 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20071019 Fedora/1.0.9-3.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: Bruce Momjian CC: Tom Lane , PostgreSQL-development Subject: Re: pgindent run coming References: <200906100348.n5A3mmN26562@momjian.us> In-Reply-To: <200906100348.n5A3mmN26562@momjian.us> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.09 tagged_above=0 required=5 tests=AWL=0.090 X-Spam-Level: X-Archive-Number: 200906/736 X-Sequence-Number: 139791 Bruce Momjian wrote: > OK, Andrew, would you use the find_typedef file that is in CVS HEAD and > run that. I think that will fix our problem and then I can use the > buildfarm version. How often does that run and does it pull the script > from CVS HEAD? > > The buildfarm does not run the find-typedefs script. Its code for this is below. My Unix machine runs this once a day. I can do runs on Windows and Cygwin manually. If there is changed logic tell me what it is and I'll try to get it done. cheers andrew ----------------- sub find_typedefs { my @err = `objdump -W 2>&1`; @err = () if `uname -s 2>&1` =~ /CYGWIN/i; my %syms; my @dumpout; my @flds; foreach my $bin (glob("$installdir/bin/*"), glob("$installdir/lib/*"), glob("$installdir/lib/postgresql/*")) { next if $bin =~ m!bin/(ipcclean|pltcl_)!; next unless -f $bin; if (@err == 1) # Linux { @dumpout = `objdump -W $bin 2>/dev/null | egrep -A3 '(DW_TAG_typedef|DW_TAG_structure_type|DW_TAG_union_type)' 2>/dev/null`; foreach (@dumpout) { @flds = split; next if (($flds[0] ne 'DW_AT_name' && $flds[1] ne 'DW_AT_name' ) || $flds[-1] =~ /^DW_FORM_str/); $syms{$flds[-1]} =1; } } else { @dumpout = `objdump --stabs $bin 2>/dev/null`; foreach (@dumpout) { @flds = split; next if (@flds < 7); next if ($flds[1] ne 'LSYM' || $flds[6] !~ /([^:]+):[tT]/); $syms{$1} =1; } } } my @badsyms = grep { /\s/ } keys %syms; push(@badsyms,'date','interval','timestamp','ANY'); delete @syms{@badsyms}; my @goodsyms = sort keys %syms; my @foundsyms; my %foundwords; my $setfound = sub { return unless (-f $_ && /^.*\.[chly]\z/); my @lines; my $handle; open ($handle,$_); while (my $line=<$handle>) { foreach my $word (split(/\W+/,$line)) { $foundwords{$word} = 1; } } close($handle); }; File::Find::find($setfound,"$branch_root/pgsql"); foreach my $sym (@goodsyms) { push(@foundsyms,"$sym\n") if exists $foundwords{$sym}; } writelog('typedefs',\@foundsyms); $steps_completed .= " find-typedefs"; }