Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759570AbYHHTNb (ORCPT ); Fri, 8 Aug 2008 15:13:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756589AbYHHTNW (ORCPT ); Fri, 8 Aug 2008 15:13:22 -0400 Received: from terminus.zytor.com ([198.137.202.10]:48793 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754727AbYHHTNW (ORCPT ); Fri, 8 Aug 2008 15:13:22 -0400 Message-ID: <489C9ACA.5060501@zytor.com> Date: Fri, 08 Aug 2008 12:13:14 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Rene Herman CC: Frans Meulenbroeks , linux-kernel@vger.kernel.org Subject: Re: including .c files ? References: <489C681B.1020805@keyaccess.nl> In-Reply-To: <489C681B.1020805@keyaccess.nl> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1152 Lines: 28 Rene Herman wrote: > > If you think about it -- in C, #include really at least conceptually > means "cut & paste this in here, please" meaning headers are not > anything special and .h and .c seperation is a mere convention. > > As we all know, conventions exist _only_ to be violated... > The real issue is that the convention -- .c versus .h -- recognize *two* kinds of files, but there really are *three* kinds of files: - Files meant to be included that generate no code (.h) - Files meant to be included that generate code (???) - Files not meant to be included (.c) Some projects -- including the Linux kernel -- have adopted the convention that the middle type should be .c, others .h, others probably other variants. You typically want them treated as .h files for purposes of generating dependencies, but like .c files for purposes of, say, header file include guard checking. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/