From ffdcb7cfebcac17fcbfde91283fd554ea90bcbf4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 18 Jul 2017 18:40:55 +0100 Subject: [PATCH] build: Require MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Require (an OCaml header file) and remove alternate defintions of ‘Nothing’ and ‘unix_error’ which are defined in this header file. We require OCaml >= 3.11 which has this header file, so there is no need to test for it or provide alternative definitions. Thanks: Pino Toscano. --- builder/index-parser-c.c | 6 ------ builder/pxzcat-c.c | 8 +------- common/mlutils/c_utils-c.c | 6 ------ common/mlutils/unix_utils-c.c | 6 ------ m4/guestfs_ocaml.m4 | 6 ------ mllib/common_utils-c.c | 6 ------ ocaml/guestfs-c.c | 6 ------ v2v/qemuopts-c.c | 6 ------ 8 files changed, 1 insertion(+), 49 deletions(-) diff --git a/builder/index-parser-c.c b/builder/index-parser-c.c index 7332f94c9..2e1ca3d30 100644 --- a/builder/index-parser-c.c +++ b/builder/index-parser-c.c @@ -33,13 +33,7 @@ #include #include #include - -#ifdef HAVE_CAML_UNIXSUPPORT_H #include -#else -#define Nothing ((value) 0) -extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; -#endif #include "index-struct.h" #include "index-parse.h" diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c index 436914ba6..15c3c32c0 100644 --- a/builder/pxzcat-c.c +++ b/builder/pxzcat-c.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "guestfs.h" #include "guestfs-utils.h" @@ -44,13 +45,6 @@ #include #endif -#ifdef HAVE_CAML_UNIXSUPPORT_H -#include -#else -#define Nothing ((value) 0) -extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; -#endif - #if defined (HAVE_LIBLZMA) && \ defined (HAVE_LZMA_INDEX_STREAM_FLAGS) && \ defined (HAVE_LZMA_INDEX_STREAM_PADDING) diff --git a/common/mlutils/c_utils-c.c b/common/mlutils/c_utils-c.c index 8c4571a6e..50841de42 100644 --- a/common/mlutils/c_utils-c.c +++ b/common/mlutils/c_utils-c.c @@ -27,13 +27,7 @@ #include #include #include - -#ifdef HAVE_CAML_UNIXSUPPORT_H #include -#else -#define Nothing ((value) 0) -extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; -#endif #include "guestfs.h" #include "guestfs-utils.h" diff --git a/common/mlutils/unix_utils-c.c b/common/mlutils/unix_utils-c.c index 2cd7b5385..631f1fddd 100644 --- a/common/mlutils/unix_utils-c.c +++ b/common/mlutils/unix_utils-c.c @@ -40,13 +40,7 @@ #include #include #include - -#ifdef HAVE_CAML_UNIXSUPPORT_H #include -#else -#define Nothing ((value) 0) -extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; -#endif extern value guestfs_int_mllib_dev_t_makedev (value majv, value minv); extern value guestfs_int_mllib_dev_t_major (value devv); diff --git a/m4/guestfs_ocaml.m4 b/m4/guestfs_ocaml.m4 index a5118c9fa..a7334cdbb 100644 --- a/m4/guestfs_ocaml.m4 +++ b/m4/guestfs_ocaml.m4 @@ -56,12 +56,6 @@ AM_CONDITIONAL([HAVE_OCAMLOPT], AM_CONDITIONAL([HAVE_OCAMLDOC], [test "x$OCAMLDOC" != "xno"]) -dnl Check for header. -old_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS -I`$OCAMLC -where`" -AC_CHECK_HEADERS([caml/unixsupport.h],[],[],[#include ]) -CPPFLAGS="$old_CPPFLAGS" - OCAML_PKG_gettext=no OCAML_PKG_libvirt=no OCAML_PKG_oUnit=no diff --git a/mllib/common_utils-c.c b/mllib/common_utils-c.c index d67437719..94ecebead 100644 --- a/mllib/common_utils-c.c +++ b/mllib/common_utils-c.c @@ -27,13 +27,7 @@ #include #include #include - -#ifdef HAVE_CAML_UNIXSUPPORT_H #include -#else -#define Nothing ((value) 0) -extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; -#endif #include diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c index 9602338da..d4ada3165 100644 --- a/ocaml/guestfs-c.c +++ b/ocaml/guestfs-c.c @@ -34,13 +34,7 @@ #include #include #include - -#ifdef HAVE_CAML_UNIXSUPPORT_H #include -#else -#define Nothing ((value) 0) -extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; -#endif #include "guestfs-c.h" diff --git a/v2v/qemuopts-c.c b/v2v/qemuopts-c.c index cfdb5f65b..40b23f956 100644 --- a/v2v/qemuopts-c.c +++ b/v2v/qemuopts-c.c @@ -28,13 +28,7 @@ #include #include #include - -#ifdef HAVE_CAML_UNIXSUPPORT_H #include -#else -#define Nothing ((value) 0) -extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; -#endif #include "qemuopts.h"