From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Why and not "config.h" ? Date: Wed, 28 Jul 2010 12:07:20 +0200 Message-ID: <87hbjjrkbr.fsf@telefonica.net> References: <87wrsgs5t3.fsf@telefonica.net> <87y6cwz6bq.fsf@catnip.gol.com> <87sk34s2ws.fsf@telefonica.net> <4C4FCE87.4090600@swipnet.se> <87iq40rtn3.fsf@telefonica.net> <4C4FD6FD.1020105@swipnet.se> <878w4wrrde.fsf@telefonica.net> <4C4FE2E8.2030009@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1280311898 11549 80.91.229.12 (28 Jul 2010 10:11:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2010 10:11:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jan =?utf-8?Q?Dj=C3=A4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 28 12:11:34 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oe3bo-0004DR-Nv for ged-emacs-devel@m.gmane.org; Wed, 28 Jul 2010 12:11:33 +0200 Original-Received: from localhost ([127.0.0.1]:38090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe3bn-0000sU-RN for ged-emacs-devel@m.gmane.org; Wed, 28 Jul 2010 06:11:31 -0400 Original-Received: from [140.186.70.92] (port=53309 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe3Xz-0007cL-T5 for emacs-devel@gnu.org; Wed, 28 Jul 2010 06:07:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oe3Xy-0007ig-BZ for emacs-devel@gnu.org; Wed, 28 Jul 2010 06:07:35 -0400 Original-Received: from impaqm3.telefonica.net ([213.4.138.3]:13593) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oe3Xy-0007iW-0c for emacs-devel@gnu.org; Wed, 28 Jul 2010 06:07:34 -0400 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm3.telefonica.net with bizsmtp id nHlg1e0282h2L9m3PN7MLC; Wed, 28 Jul 2010 12:07:21 +0200 Original-Received: from qcore ([83.42.13.171]) by IMPmailhost3.adm.correo with BIZ IMP id nN7L1e00K3hRxRf1jN7LzF; Wed, 28 Jul 2010 12:07:21 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" In-Reply-To: <4C4FE2E8.2030009@swipnet.se> ("Jan =?utf-8?Q?Dj=C3=A4rv=22's?= message of "Wed, 28 Jul 2010 09:57:28 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:127929 Archived-At: [Seems that gmane ate my post. Sorry if this is a duplicate] Jan Dj=C3=A4rv writes: [snip] > As I said, it is a feature not having to run make bootstrap in every > build tree. I usually have five of them (Gtk, Lucid, Motif/Lesstif, > X, no-X). I see that it can save lots of compile time, but it is not a safe practice. [snip] > No, I don't think you are making up things, there are a lot of buggy > tools out there. But which tools are we going to make this change > for? Are they free and generally useful for all developers? Most > analysis tools I've used does not have any problem with <> and "". > You usually can pass -I. to them if that is needed. In this case, the tool is CMake. I'm not sure if it is a bug or a feature, I've asked about that on their ml. People used to complain about the time required for checking depedencies on large projects (this is specially aggravating on Windows) and maybe they ignore headers included with <>, which usually are external to the project. It seems a bit extreme to me, but may be. IIRC some tools of the style of the late SourceNavigator have switches for not diving into headers included with <>, which is very convenient as today a simple #include can bring in tens of thousands of LoC from some big library. Yesterday I had an issue with MinGW using a build specification that worked fine on GNU/Linux and, on addition, was formally correct. Through some intermediate steps, the compiler ended picking up src/process.h instead of mingw/include/process.h. Replacing with "config.h" fixed the problem. [snip] > No, it does not. The search for include files with <> does not start > in the current directory, where as for "" it does. That is the only > difference. If the headers are system headers or not is not the > difference. With <> the search does not start on the current directory for avoiding collisions with the headers there. That means that the "external" headers take precedence. You can call it system headers or library headers, but the intention is that they do not belong to the set of source files being compiled at the moment. However, I agree with you that it is convenience, nor stylistic theory, what matters here. As an anecdote, I'll say that, as others mentioned, what <> means is implementation-dependant. Long time ago this issue arised on the Borland newsgroups because some user discovered the hard way that their compiler had slightly different rules from GCC. After some minutes reading the C++ standard it was clear that when the compiler finds #include it can reformat your hard disk and be perfectly conformant. They write it on a very technical, serious-looking language, though.