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-next>] [day] [month] [year] [list]
Date:	Fri, 8 Aug 2008 13:25:36 +0200
From:	"Frans Meulenbroeks" <fransmeulenbroeks@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: including .c files ?

I was wondering how people feel about including .c files in other .c files.

I saw a few occasions of this.
Triggered by that observation I decided to do a grep for this (on
2.6.25.7 as that was the one I had handy at that moment).
Some 268 .c files are included.
Seems an awful lot for me.

Do people feel this is good practice?
I understand that sometimes it is useful (and then you might need to
decide on whether to include a .c file or to have a .h file with
code), but in other places it is probably less relevant.

Generally I would expect that if the .c file contains some standalone
functionality then it should probably be a .c file on its own with a
well defined interface.

Curious what others think about this.
As attachement I've added the output of the grep (slightly edited to
remove some false positives, like those from the Documentation and
scripts directories and those who are obviously comments).

Frans.

View attachment "C_INC.txt" of type "text/plain" (14727 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ