[PATCH] Correct reference to GCC compiler macro

Maxim Dounin mdounin at mdounin.ru
Fri Apr 1 10:44:23 UTC 2016


Hello!

On Tue, Mar 01, 2016 at 01:40:13PM -0600, Joel Cunningham wrote:

> # HG changeset patch
> # User Joel Cunningham <joel.cunningham at me.com>
> # Date 1456860378 21600
> #      Tue Mar 01 13:26:18 2016 -0600
> # Node ID cce5f2f6ed76ffa0f6890e90e7b1b68718ffa8a9
> # Parent  3b9fe734a76ca0863ec87596369690831e9f4086
> Correct reference to GCC compiler macro
> 
> This commit corrects a small typo where __GNU__ was used in place of
> __GNUC__
> 
> This was identified on a GCC system that built with undefined macros
> treated as errors when used with #if
> 
> diff -r 3b9fe734a76c -r cce5f2f6ed76 src/core/ngx_config.h
> --- a/src/core/ngx_config.h    Tue Mar 01 15:18:07 2016 +0300
> +++ b/src/core/ngx_config.h    Tue Mar 01 13:26:18 2016 -0600
> @@ -125,7 +125,7 @@
>  #endif
>  
>  
> -#if ((__GNU__ == 2) && (__GNUC_MINOR__ < 8))
> +#if ((__GNUC__ == 2) && (__GNUC_MINOR__ < 8))
>  #define NGX_MAX_UINT32_VALUE  (uint32_t) 0xffffffffLL
>  #else
>  #define NGX_MAX_UINT32_VALUE  (uint32_t) 0xffffffff

I've tested with GCC 2.7 and commited a patch to remove this 
preprocessor check:

http://hg.nginx.org/nginx/rev/5805301f990f

Thanks for reporting.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list