[PATCH] Core: reorder #ifdef in .h file to match order in .c file

Maxim Dounin mdounin at mdounin.ru
Wed Jul 13 18:01:03 UTC 2016


Hello!

On Wed, Jul 13, 2016 at 10:29:04AM -0700, Piotr Sikora wrote:

> Hey Maxim,
> 
> > Current order matches one used in #if in the same .h file, and I
> > don't think this order needs to be changed.
> 
> Hmm? Are we looking at the same files?
> 
> http://hg.nginx.org/nginx/file/tip/src/os/unix/ngx_setaffinity.h:
> 
>     #if (NGX_HAVE_SCHED_SETAFFINITY)
>     ...
>     #elif (NGX_HAVE_CPUSET_SETAFFINITY)
>     ...
>     #endif
> 
> http://hg.nginx.org/nginx/file/tip/src/os/unix/ngx_setaffinity.c:
> 
>     #if (NGX_HAVE_CPUSET_SETAFFINITY)
>     ....
>     #elif (NGX_HAVE_SCHED_SETAFFINITY)
>     ....
>     #endif
> 
> The order is different... And yes, I know that's nitpicking.

I wrote "in #if in the same .h file", that is,
http://hg.nginx.org/nginx/file/tip/src/os/unix/ngx_setaffinity.h#l10:

    #if (NGX_HAVE_SCHED_SETAFFINITY || NGX_HAVE_CPUSET_SETAFFINITY)
    ...
    #if (NGX_HAVE_SCHED_SETAFFINITY)
    ...
    #elif (NGX_HAVE_CPUSET_SETAFFINITY)
    ...
    #endif
    ...

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



More information about the nginx-devel mailing list