All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Jerin Jacob <jerinj@marvell.com>
Subject: Re: [PATCH v2] build/eal: add OS defines for C conditional checks
Date: Mon, 17 Jan 2022 19:20:07 +0100	[thread overview]
Message-ID: <2961371.ktpJ11cQ8Q@thomas> (raw)
In-Reply-To: <20211216152107.725239-1-bruce.richardson@intel.com>

16/12/2021 16:21, Bruce Richardson:
> Define a set of macros in the build configuration to allow C runtime
> code to check the current OS environment. This saves the user having to
> use ifdefs for e.g. disabling particular tests on Windows. See included
> documentation changes for usage examples.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
> 
> ---
> V2: Included feedback from Dmitry to expand on documentation to include
> guidelines on when to use conditional compilation.
> ---
[...]
> +* If the code in question cannot compile on all systems, but constitutes only a small fragment of
> +  a file, then conditional complication should be used, as described in this section.

complication -> compilation

[...]
> +  switch (RTE_EXEC_ENV) {
> +     case RTE_ENV_FREEBSD:
> +         default = x;
> +         break;
> +     case RTE_ENV_LINUX:
> +         default = y;
> +         break;
> +     case RTE_ENV_WINDOWS:
> +         default = z;
> +         break;
> +  }

This is not the recommended indentation.

Applied with minor changes, thanks.



      reply	other threads:[~2022-01-17 18:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 14:53 [PATCH] build/eal: add OS defines for C conditional checks Bruce Richardson
2021-12-13  7:21 ` Jerin Jacob
2021-12-13 22:58 ` Dmitry Kozlyuk
2021-12-14 12:03   ` Bruce Richardson
2021-12-16 15:21 ` [PATCH v2] " Bruce Richardson
2022-01-17 18:20   ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2961371.ktpJ11cQ8Q@thomas \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=jerinj@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.