* [PATCH for-4.5] libxl: expose #define to 4.5 and above
@ 2014-12-03 10:41 Wei Liu
2014-12-03 10:50 ` Ian Campbell
2014-12-03 12:53 ` Andrew Cooper
0 siblings, 2 replies; 5+ messages in thread
From: Wei Liu @ 2014-12-03 10:41 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Wei Liu, Ian Campbell, Andrew Cooper
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>
Cc: 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 */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.5] libxl: expose #define to 4.5 and above
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-03 12:53 ` Andrew Cooper
1 sibling, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-12-03 10:50 UTC (permalink / raw)
To: Wei Liu, Konrad Rzeszutek Wilk; +Cc: Andrew Cooper, Ian Jackson, xen-devel
On Wed, 2014-12-03 at 10:41 +0000, 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>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Konrad, given that the original patch is in 4.5 (as of yesterday) we
should obviously take this one too.
> ---
> 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 */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.5] libxl: expose #define to 4.5 and above
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 12:53 ` Andrew Cooper
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2014-12-03 12:53 UTC (permalink / raw)
To: Wei Liu, xen-devel; +Cc: Ian Jackson, Ian Campbell
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 */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.5] libxl: expose #define to 4.5 and above
2014-12-03 10:50 ` Ian Campbell
@ 2014-12-03 16:20 ` Konrad Rzeszutek Wilk
2014-12-04 13:02 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-12-03 16:20 UTC (permalink / raw)
To: Ian Campbell; +Cc: Ian Jackson, Andrew Cooper, Wei Liu, xen-devel
On Wed, Dec 03, 2014 at 10:50:34AM +0000, Ian Campbell wrote:
> On Wed, 2014-12-03 at 10:41 +0000, 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>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> Konrad, given that the original patch is in 4.5 (as of yesterday) we
> should obviously take this one too.
Right. Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.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 */
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.5] libxl: expose #define to 4.5 and above
2014-12-03 16:20 ` Konrad Rzeszutek Wilk
@ 2014-12-04 13:02 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-12-04 13:02 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: Ian Jackson, Andrew Cooper, Wei Liu, xen-devel
On Wed, 2014-12-03 at 11:20 -0500, Konrad Rzeszutek Wilk wrote:
> On Wed, Dec 03, 2014 at 10:50:34AM +0000, Ian Campbell wrote:
> > On Wed, 2014-12-03 at 10:41 +0000, 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>
> > > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> >
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> >
> > Konrad, given that the original patch is in 4.5 (as of yesterday) we
> > should obviously take this one too.
>
> Right. Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-04 13:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.