Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D39C52E002D for ; Thu, 15 May 2008 12:49:59 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 08237-10 for ; Thu, 15 May 2008 12:49:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gmp-eb-inf-2.sun.com (gmp-eb-inf-2.sun.com [192.18.6.24]) by developer.postgresql.org (Postfix) with ESMTP id 012C32E002F for ; Thu, 15 May 2008 12:49:48 -0300 (ADT) Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe1.eu.sun.com [192.18.6.10]) by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m4FFnl1m018163 for ; Thu, 15 May 2008 15:49:47 GMT Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K0X00K011QEBE00@fe-emea-10.sun.com> (original mail from Zdenek.Kotala@Sun.COM) for pgsql-hackers@postgresql.org; Thu, 15 May 2008 16:49:47 +0100 (BST) Received: from [129.157.18.76] by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K0X00LHY2METG70@fe-emea-10.sun.com>; Thu, 15 May 2008 16:49:27 +0100 (BST) Date: Thu, 15 May 2008 17:48:58 +0200 From: Zdenek Kotala Subject: Re: bloated heapam.h In-reply-to: <20080513154200.GH6966@alvh.no-ip.org> To: Alvaro Herrera Cc: Tom Lane , Pg Hackers Message-id: <482C5B6A.5080804@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <20080512000642.GB5746@alvh.no-ip.org> <20080512002153.GC5746@alvh.no-ip.org> <20080512002853.GD5746@alvh.no-ip.org> <48283673.2080304@sun.com> <20080512161350.GM5655@alvh.no-ip.org> <48289595.7050708@sun.com> <20080512192656.GA19344@alvh.no-ip.org> <48289FFB.8010500@sun.com> <20080512200253.GB19344@alvh.no-ip.org> <4828B7AF.4030002@sun.com> <20080513154200.GH6966@alvh.no-ip.org> User-Agent: Thunderbird 2.0.0.12 (X11/20080325) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/510 X-Sequence-Number: 118509 Alvaro Herrera wrote: > Zdenek Kotala wrote: >> Alvaro Herrera napsal(a): >> >>>> I try to play with lint now if it gets better results. >>> Ok, good. >> Hmm, It generates a lot of unnecessary includes in *.c files. I have >> checked only couple of them and it seems that they are really >> unnecessary. A attach output. Unfortunately, it does not detect missing >> heapam.h from bufpage.h. However, I have not tested all magic switches >> yet :-). There are also several reports about system headers file, but >> it could be platform specific warning. > > Interesting. It seems that Bruce's script could be replaced by lint. > Please share the switches you used. > I used following switches which only shows unused included file. I run command in backend directory. lint -I ../include -errtags -errhdr=%all -Ncheck=%none -Nlevel=1 -erroff=%all -erroff=no%E_INCL_NUSD -c `find . -name "*.c"` > include.out Good to mention that I use lint from Sun Studio 12. Zdenek