lzip-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lzip-bug] include pthread.h in plzip.cc


From: Ersek, Laszlo
Subject: Re: [Lzip-bug] include pthread.h in plzip.cc
Date: Tue, 19 Jan 2010 20:57:47 +0100 (CET)

(Sorry for the self-followup.)

On Tue, 19 Jan 2010, Ersek, Laszlo wrote:

a) One approach is to #include headers only in .c (or .cc) files, and forbid recursive inclusion, ie. #include preprocessing directives in headers. Each .c (.cc) file is responsible for collecting all necessary declarations (and in the right order) from the appropriate headers.

An advantage of this approach is that all dependencies are immediately visible in the .c / .cc files (at least on own headers, because system headers do contain recursive #include's). Therefore, manually gathering the Makefile prerequisites for the compilation of a source file becomes easier.

(Personally, I'm content with gcc -MM.)

Cheers,
lacos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]