lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 08 Aug 2008 12:13:14 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Rene Herman <rene.herman@...access.nl>
CC:	Frans Meulenbroeks <fransmeulenbroeks@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: including .c files ?

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ