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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Dec 2013 14:48:50 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
cc:	josh@...htriplett.org, Rashika Kheria <rashika.kheria@...il.com>,
	<linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-usb@...r.kernel.org>
Subject: Re: [PATCH 3/7] drivers: usb: Include appropriate header file in
 hcd.h

On Thu, 19 Dec 2013, Sergei Shtylyov wrote:

>     I don't really see how C language design can justify header files that 
> once included, require each .c file to #include other headers ahead of them, 
> each time such header is used. In my opinion, it's just crazy.

Okay, you've convinced me.

In this case, anyway, it makes sense to add the structure declarations
to the header file.  That's a lot less objectionable than adding a new 
include line (even though the compiler doesn't care).

By the way, if anyone cares, this discussion reminded me something
interesting.  It's sort of the opposite side of the coin, a case where
a source file would do something _different_ each time it was included.

The program itself was a fairly simple thing to calculate and print
prime numbers.  The interesting part was that this didn't happen when 
you would _run_ the program -- it happened when you _compiled_ the 
program!  Lots of preprocessor stuff to make it work.  And the only way 
to persuade the compiler to go into a loop was for the source file to 
include itself.  :-)

Alan Stern

--
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