From: Don Slutz <dslutz@verizon.com>
To: xen-devel@lists.xen.org
Cc: David Scott <dave.scott@eu.citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Don Slutz <dslutz@verizon.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [BUGFIX][PATCH 1/1] xenlight_stubs.c: Allow it to build with ocaml 3.09.3
Date: Fri, 7 Feb 2014 16:51:51 -0500 [thread overview]
Message-ID: <1391809911-13610-2-git-send-email-dslutz@verizon.com> (raw)
In-Reply-To: <1391809911-13610-1-git-send-email-dslutz@verizon.com>
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 <dslutz@verizon.com>
---
tools/ocaml/libs/xl/xenlight_stubs.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c
index 23f253a..8e825ae 100644
--- a/tools/ocaml/libs/xl/xenlight_stubs.c
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c
@@ -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; \
--
1.8.4
next prev parent reply other threads:[~2014-02-07 21:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 21:51 [BUGFIX][PATCH 0/1] Enable 4.4 to build on CentOS/RHEL 5.10 Don Slutz
2014-02-07 21:51 ` Don Slutz [this message]
2014-02-10 12:38 ` [BUGFIX][PATCH 1/1] xenlight_stubs.c: Allow it to build with ocaml 3.09.3 George Dunlap
2014-02-10 13:49 ` David Scott
2014-02-11 13:08 ` Ian Campbell
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=1391809911-13610-2-git-send-email-dslutz@verizon.com \
--to=dslutz@verizon.com \
--cc=andrew.cooper3@citrix.com \
--cc=dave.scott@eu.citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).