[PATCH v2 00/25] Simplify inclusion conditionals

Alejandro Colomar alx.manpages at gmail.com
Mon Jun 20 07:22:29 UTC 2022



On 6/20/22 09:10, Alejandro Colomar wrote:
> Hi Andrew,
> 
> v2:
>   - 05/25: elif -> if
>   - 20/25: Added a few more cases I found.
>   - 24/25: Subject wfix
>   - 25/25: Added patch for <malloc.h>
> 
> The rest should be the same as v1, IIRC.
> 
> But patch 25/25 for some reason breaks completely unrelated stuff
> from <sys/socket.h> that I can't fix even if I include
> <sys/socket.h> directly in the file that breaks.  I can't make any
> sense of it right now; could you please have a look at it?  Try to
> compile after 24, which should work, and then compile after 25 and
> you'll be shocked, I guess;).

Oh, and I forgot to mention:

02/25: Reviewed-by: Andrew Clayton <andrew at digital-domain.net>
03/25: Reviewed-by: Andrew Clayton <andrew at digital-domain.net>

I don't count 05 because it has changed.

> 
> Cheers,
> 
> Alex
> 
> Alejandro Colomar (25):
>    Including <mntent.h> iff it exists.
>    Including <sys/prctl.h> iff it exists.
>    Including <linux/openat2.h> iff it exists.
>    Including <sys/mount.h> unconditionally.
>    Including <sys/random.h> iff it exists.
>    Including <sys/sendfile.h> iff it exists.
>    Including <sys/pollset.h> iff it exists.
>    Including <sys/devpoll.h> iff it exists.
>    Including <port.h> iff it exists.
>    Including <sys/event.h> iff it exists.
>    Including <sys/eventfd.h> iff it exists.
>    Including <sys/signalfd.h> iff it exists.
>    Including <sys/epoll.h> iff it exists.
>    Including <sys/un.h> iff it exists.
>    Removed code used when NXT_HAVE_POSIX_SPAWN is false.
>    Including <sys/mercury.h> iff it exists.
>    Including <malloc_np.h> iff it exists.
>    Including <sys/param.h> unconditionally.
>    Including <sys/uio.h> unconditionally.
>    Including <sys/syscall.h> and <unistd.h> unconditionally.
>    Including <linux/memfd.h> iff it exists.
>    Including <linux/capability.h> iff it exists.
>    Removed unnecessary include.
>    Moved <sys/filio.h> test to <auto/headers>.
>    Including <malloc.h> iff it exists.
> 
>   auto/headers          | 250 ++++++++++++++++++++++++++++++++++++++++++
>   auto/sockets          |  20 ----
>   auto/unix             |  15 ---
>   configure             |   1 +
>   src/nxt_application.c |   2 +-
>   src/nxt_capability.c  |   8 +-
>   src/nxt_fs.c          |   2 -
>   src/nxt_isolation.c   |   2 +-
>   src/nxt_port_memory.c |   7 +-
>   src/nxt_process.c     |  50 +--------
>   src/nxt_process.h     |   4 +-
>   src/nxt_socket_msg.h  |   2 +-
>   src/nxt_unit.c        |   2 +-
>   src/nxt_unix.h        |  57 +++++-----
>   14 files changed, 294 insertions(+), 128 deletions(-)
>   create mode 100644 auto/headers
> 

-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20220620/5b807f1d/attachment.bin>


More information about the unit mailing list