Enable 4.4 to build on CentOS/RHEL 5.10
cover Enable 4.4 to build on CentOS/RHEL 5.10
I only did Andrew Cooper's statement of "Applying the top macro". There is no checking of ocaml version.
Since CentOS/RHEL 5.10 (Released on 22-Oct-2013) disto provides ocaml 3.09.3, the current code does not build.
Compile tested and simple tests done on CentOS 5.10 and Fedora 17.
Note: The formating of the code was changed to be closer to "Coding Style for the Xen Hypervisor". The file has a non-standard emacs setting at the end (indent of 8 and use tabs). And the example of code just below was not used as an example of coding style to follow do to lack of indent at all.
I feel this should have a release exception and go into 4.4 for 2 reasons:
1) It is a bufix for CentOS/RHEL 5.10 and looks to be low risk.
2) It make the release more awesome to run on these distros.
"What functionality is being fixed / enabled by this patch?"
4.4 Added CAML_returnT usage. ocaml provided this at 3.09.4.
"If there was a bug in this patch, what functionality might be broken?"
ocaml may stop functioning. Since this is conditional code, ocaml should only possibly have issues on CentOS/RHEL 5.10.
"What is the probability that this patch has a bug?"
I feel it is low.
Mail thread:
http://lists.xen.org/archives/html/xen-devel/2014-02/msg00665.html
Don Slutz (1):
xenlight_stubs.c: Allow it to build with ocaml 3.09.3
tools/ocaml/libs/xl/xenlight_stubs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Signature · 1 line
1.8.4
PATCH 1/1 xenlight_stubs.c: Allow it to build with ocaml 3.09.3
This code was copied from:
http://docs.camlcity.org/docs/godisrc/oasis-ocaml-fd-1.1.1.tar.gz/ocaml-fd-1.1.1/lib/fd_stubs.c
--- tools/ocaml/libs/xl/xenlight_stubs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
tools/ocaml/libs/xl/xenlight_stubs.c +13 -0
@@ -35,6 +35,19 @@#include "caml_xentoollog.h" +/* +* Starting with ocaml-3.09.3, CAMLreturn can only be used for ``value'' +* types. CAMLreturnT was only added in 3.09.4, so we define our own +* version here if needed. +*/ +#ifndef CAMLreturnT +#define CAMLreturnT (type, result) do { \ + type caml__temp_result = (result); \ + caml_local_roots = caml__frame; \ + return (caml__temp_result); \ +} while (0) +#endif +/* The following is equal to the CAMLreturn macro, but without the return */ #define CAMLdone do{ \ caml_local_roots = caml__frame; \
Signature · 1 line
1.8.4
Re: [BUGFIX][PATCH 1/1] xenlight_stubs.c: Allow it to build with ocaml 3.09.3
Quoted 5 lines · Don Slutz
This code was copied from:
http://docs.camlcity.org/docs/godisrc/oasis-ocaml-fd-1.1.1.tar.gz/ocaml-fd-1.1.1/lib/fd_stubs.c
Signed-off-by Don Slutz <[email protected]>
Quoted 28 lines
--- tools/ocaml/libs/xl/xenlight_stubs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)tools/ocaml/libs/xl/xenlight_stubs.c +13
-0@@ -35,6 +35,19 @@#include "caml_xentoollog.h" +/* +* Starting with ocaml-3.09.3, CAMLreturn can only be used for ``value'' +* types. CAMLreturnT was only added in 3.09.4, so we define our own +* version here if needed. +*/ +#ifndef CAMLreturnT +#define CAMLreturnT (type, result) do { \ + type caml__temp_result = (result); \ + caml_local_roots = caml__frame; \ + return (caml__temp_result); \ +} while (0) +#endif +/* The following is equal to the CAMLreturn macro, but without the return */ #define CAMLdone do{ \ caml_local_roots = caml__frame; \
David Scott
Acked-byRe: [BUGFIX][PATCH 1/1] xenlight_stubs.c: Allow it to build with ocaml 3.09.3
Quoted 9 lines · George Dunlap
Quoted 6 lines · Don Slutz
This code was copied from:
http://docs.camlcity.org/docs/godisrc/oasis-ocaml-fd-1.1.1.tar.gz/ocaml-fd-1.1.1/lib/fd_stubs.c
Signed-off-by Don Slutz <[email protected]>Release-acked-by George Dunlap <[email protected]>
Also looks fine to me
Quoted 30 lines
Quoted 29 lines
--- tools/ocaml/libs/xl/xenlight_stubs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)tools/ocaml/libs/xl/xenlight_stubs.c +13
-0@@ -35,6 +35,19 @@#include "caml_xentoollog.h" +/* +* Starting with ocaml-3.09.3, CAMLreturn can only be used for ``value'' +* types. CAMLreturnT was only added in 3.09.4, so we define our own +* version here if needed. +*/ +#ifndef CAMLreturnT +#define CAMLreturnT (type, result) do { \ + type caml__temp_result = (result); \ + caml_local_roots = caml__frame; \ + return (caml__temp_result); \ +} while (0) +#endif +/* The following is equal to the CAMLreturn macro, but without the return */
#define CAMLdone do{ \
caml_local_roots=caml__frame; \
Re: [BUGFIX][PATCH 1/1] xenlight_stubs.c: Allow it to build with ocaml 3.09.3
Quoted 5 lines · David Scott
Quoted 4 lines · George Dunlap
Quoted 3 lines · Don Slutz
This code was copied from:
http://docs.camlcity.org/docs/godisrc/oasis-ocaml-fd-1.1.1.tar.gz/ocaml-fd-1.1.1/lib/fd_stubs.c
I see an LGPL 2.1 statement in that file, so I think it is OK to copy.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Signed-off-by Don Slutz <[email protected]>Release-acked-by George Dunlap <[email protected]>Also looks fine to me
Acked-by David Scott <[email protected]>
Acked + applied, thanks.