Re: [RFC PATCH] Move SHA-1 implementation selection into a header file

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

 



On Tue, Mar 14, 2017 at 11:42:20PM +0000, Ramsay Jones wrote:
> 
> 
> On 14/03/17 20:44, Junio C Hamano wrote:
> > OK, then I'll queue this.  The selection still goes to BASIC_CFLAGS
> > so the dependencies for re-compilation should be right, I'd think.
> > 
> > -- >8 --
> > From: "brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx>
> > Date: Sat, 11 Mar 2017 22:28:18 +0000
> > Subject: [PATCH] hash.h: move SHA-1 implementation selection into a header file
> > 
> > Many developers use functionality in their editors that allows for quick
> > syntax checks, including warning about questionable constructs.  This
> > functionality allows rapid development with fewer errors.  However, such
> > functionality generally does not allow the specification of
> > project-specific defines or command-line options.
> > 
> > Since the SHA1_HEADER include is not defined in such a case, developers
> > see spurious errors when using these tools.  Furthermore, while using a
> > macro as the argument to #include is permitted by C11, it isn't
> > permitted by C89 and C99, and there are known implementations which
> > reject it.
> 
> C99 certainly allows a macro argument to #include (see, 6.10.2-4; there
> is also an example in 6.10.2-8).
> 
> I can't remember if it's allowed in C89/C90 (I think it is). I only
> have immediate access to the C99 and C11 standards (and I can't be
> bothered to search), so I can't say for sure.

You're right.  I only have access to N1124 (the C99 final draft), but it
does allow that.  I could have sworn it was new in C11.  I'm pretty
certain it isn't allowed in C89, but I don't have access to that
standard.

I know there have been reasonably standards-conforming compilers that
have rejected it in the past, but I can't remember which ones (I think
they were for proprietary Unices).

Junio, do you want to amend the commit message before you merge it?
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


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