Re: [RFC/PATCH] headers: normalize the spelling of some header guards

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

 




On 15/10/18 00:59, Jeff King wrote:
> On Sun, Oct 14, 2018 at 09:13:09PM +0100, Ramsay Jones wrote:
> 
>> This patch is marked RFC because I am not aware of any policy with
>> regard to header guard spelling. Having said that, apart from the
>> fetch-negotiator.h header, all of these headers are using a reserved
>> identifier (see C99 Standard 7.1.3).
>>
>> These headers were found, thus:
>>
>>   $ git grep -n -E '^#ifn?def ' -- '*.h' | grep 'h\:1\:' | grep -v '^compat' | grep -v -E '[A-Z_]*_H$'
>>   alias.h:1:#ifndef __ALIAS_H__
>>   commit-reach.h:1:#ifndef __COMMIT_REACH_H__
>>   fetch-negotiator.h:1:#ifndef FETCH_NEGOTIATOR
>>   midx.h:1:#ifndef __MIDX_H__
>>   t/helper/test-tool.h:1:#ifndef __TEST_TOOL_H__
>>   vcs-svn/fast_export.h:1:#ifndef FAST_EXPORT_H_
>>   vcs-svn/line_buffer.h:1:#ifndef LINE_BUFFER_H_
>>   vcs-svn/sliding_window.h:1:#ifndef SLIDING_WINDOW_H_
>>   vcs-svn/svndiff.h:1:#ifndef SVNDIFF_H_
>>   vcs-svn/svndump.h:1:#ifndef SVNDUMP_H_
> 
> I think the ones with a trailing underscore are actually OK according to
> the standard (not sure if your "all of these" was including the ones in
> vcs-svn ;) ).

Yes, trailing underscore is fine - "all of these" meant the
headers in the patch, with the noted exception of fetch-negotiator.h.

> I'm in favor of normalizing even the ones that aren't illegal, though
> I'm OK either way on the vcs-svn bits if they're going away anyway.

I wasn't sure about vcs-svn, but assumed that they might go
away soon (hence the cc: list). I will be happy to add them
to the patch, if that is not the case.

Thanks.

ATB,
Ramsay Jones




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

  Powered by Linux