libxl: expose #define to 4.5 and above
PATCH 1/1 libxl: expose #define to 4.5 and above
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.
--- tools/libxl/libxl.h | 6 +++--- tools/libxl/libxl_utils.c | 2 +- tools/libxl/libxl_utils.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
tools/libxl/libxl.h +3 -3
@@ -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 /*
tools/libxl/libxl_utils.c +1 -1
@@ -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)
tools/libxl/libxl_utils.h +1 -1
@@ -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 */
Signature · 1 line
1.7.10.4
Quoted 8 lines · Wei Liu
In
e3abab74(libxl: un-constify return value oflibxl_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 <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>Cc Andrew Cooper <[email protected]>
Konrad, given that the original patch is in 4.5 (as of yesterday) we should obviously take this one too.
Quoted 53 lines
--- tools/libxl/libxl.h | 6 +++--- tools/libxl/libxl_utils.c | 2 +- tools/libxl/libxl_utils.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)tools/libxl/libxl.h +3
-3@@ -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 /* tools/libxl/libxl_utils.c +1
-1@@ -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)tools/libxl/libxl_utils.h +1
-1@@ -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 */
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Wei Liu
In
e3abab74(libxl: un-constify return value oflibxl_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 <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>Cc Andrew Cooper <[email protected]>
Quoted 4 lines
Acked-by Ian Campbell <[email protected]>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 <[email protected]>
Quoted 56 lines
Quoted 54 lines
--- tools/libxl/libxl.h | 6 +++--- tools/libxl/libxl_utils.c | 2 +- tools/libxl/libxl_utils.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)tools/libxl/libxl.h +3
-3@@ -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 /* tools/libxl/libxl_utils.c +1
-1@@ -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)tools/libxl/libxl_utils.h +1
-1@@ -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 */
Ian Campbell
AppliedQuoted 11 lines · Konrad Rzeszutek Wilk
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Wei Liu
In
e3abab74(libxl: un-constify return value oflibxl_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 <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>Cc Andrew Cooper <[email protected]>
Quoted 6 lines
Quoted 4 lines
Acked-by Ian Campbell <[email protected]>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 <[email protected]>
Applied, thanks.
Quoted 7 lines · Wei Liu
In
e3abab74(libxl: un-constify return value oflibxl_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 <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>
Quoted 53 lines
--- tools/libxl/libxl.h | 6 +++--- tools/libxl/libxl_utils.c | 2 +- tools/libxl/libxl_utils.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)tools/libxl/libxl.h +3
-3@@ -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 /* tools/libxl/libxl_utils.c +1
-1@@ -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)tools/libxl/libxl_utils.h +1
-1@@ -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 */