Re: [PATCH v3 2/2] headers: include dependent headers

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

 



On 07/09/14 11:35, René Scharfe wrote:
> Am 07.09.2014 um 11:36 schrieb David Aguilar:
>> Add dependent headers so that including a header does not
>> require including additional headers.
>>
>> This makes it so that "gcc -c $header" succeeds for each header.
> 
>> diff --git a/cache.h b/cache.h
>> index 4d5b76c..8b827d7 100644
>> --- a/cache.h
>> +++ b/cache.h
>> @@ -1,7 +1,6 @@
>>   #ifndef CACHE_H
>>   #define CACHE_H
>>
>> -#include "git-compat-util.h"
>>   #include "strbuf.h"
>>   #include "hashmap.h"
>>   #include "advice.h"
> 
> Oh, that's a new change and worth mentioning in the commit message.

Hmm, does this not break git? Unless you also change each '.c' file which
includes cache.h to also include git-compat-util.h first, then I suspect
(if nothing else) file I/O may be broken. (see _FILE_OFFSET_BITS).

Also, see Documentation/CodingGuidelines (lines 331-333).

ATB,
Ramsay Jones



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]