All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, xen-devel@lists.xen.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH for-4.5] libxl: expose #define to 4.5 and above
Date: Wed, 3 Dec 2014 12:53:08 +0000	[thread overview]
Message-ID: <547F07B4.2050805@citrix.com> (raw)
In-Reply-To: <1417603298-4213-1-git-send-email-wei.liu2@citrix.com>

On 03/12/14 10:41, Wei Liu wrote:
> In e3abab74 (libxl: un-constify return value of libxl_basename), the
> macro was exposed to releases < 4.5. However only new code is able to
> make use of that macro so it should be exposed to releases >= 4.5.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
>  tools/libxl/libxl.h       |    6 +++---
>  tools/libxl/libxl_utils.c |    2 +-
>  tools/libxl/libxl_utils.h |    2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
> index 291c190..0a123f1 100644
> --- a/tools/libxl/libxl.h
> +++ b/tools/libxl/libxl.h
> @@ -478,13 +478,13 @@ typedef struct libxl__ctx libxl_ctx;
>  #endif
>  
>  /*
> - * LIBXL_HAVE_CONST_LIBXL_BASENAME_RETURN_VALUE
> + * LIBXL_HAVE_NONCONST_LIBXL_BASENAME_RETURN_VALUE
>   *
>   * The return value of libxl_basename is malloc'ed but the erroneously
>   * marked as "const" in releases before 4.5.
>   */
> -#if defined(LIBXL_API_VERSION) && LIBXL_API_VERSION < 0x040500
> -#define LIBXL_HAVE_CONST_LIBXL_BASENAME_RETURN_VALUE 1
> +#if !defined(LIBXL_API_VERSION) || LIBXL_API_VERSION >= 0x040500
> +#define LIBXL_HAVE_NONCONST_LIBXL_BASENAME_RETURN_VALUE 1
>  #endif
>  
>  /*
> diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
> index 22119fc..7095b58 100644
> --- a/tools/libxl/libxl_utils.c
> +++ b/tools/libxl/libxl_utils.c
> @@ -19,7 +19,7 @@
>  
>  #include "libxl_internal.h"
>  
> -#ifdef LIBXL_HAVE_CONST_LIBXL_BASENAME_RETURN_VALUE
> +#ifndef LIBXL_HAVE_NONCONST_LIBXL_BASENAME_RETURN_VALUE
>  const
>  #endif
>  char *libxl_basename(const char *name)
> diff --git a/tools/libxl/libxl_utils.h b/tools/libxl/libxl_utils.h
> index 8277eb9..acacdd9 100644
> --- a/tools/libxl/libxl_utils.h
> +++ b/tools/libxl/libxl_utils.h
> @@ -18,7 +18,7 @@
>  
>  #include "libxl.h"
>  
> -#ifdef LIBXL_HAVE_CONST_LIBXL_BASENAME_RETURN_VALUE
> +#ifndef LIBXL_HAVE_NONCONST_LIBXL_BASENAME_RETURN_VALUE
>  const
>  #endif
>  char *libxl_basename(const char *name); /* returns string from strdup */

      parent reply	other threads:[~2014-12-03 12:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 10:41 [PATCH for-4.5] libxl: expose #define to 4.5 and above Wei Liu
2014-12-03 10:50 ` Ian Campbell
2014-12-03 16:20   ` Konrad Rzeszutek Wilk
2014-12-04 13:02     ` Ian Campbell
2014-12-03 12:53 ` Andrew Cooper [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=547F07B4.2050805@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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.