lib: Move utilities to new directory common/utils.

Just code motion.

This commit makes it clearer what is a utility and what is part of the
library.  It also makes it clear that we should rename:

  guestfs-internal-frontend.h -> utils.h
  guestfs-internal-frontend-cleanups.h -> cleanups.h (?)

but this commit does not make that change.
This commit is contained in:
Richard W.M. Jones
2017-01-19 15:53:19 +00:00
parent 88c0ce2397
commit b53cec584d
61 changed files with 235 additions and 103 deletions

View File

@@ -69,19 +69,20 @@ stamp-mlguestfs: libguestfsocaml.a $(guestfs_cmm)
$(libguestfsocaml_a_OBJECTS) guestfs.cmo \
$(LDFLAGS) \
$(LTLIBINTL) \
-L$(top_builddir)/src/.libs -lguestfs
-L../src/.libs -lguestfs
if HAVE_OCAMLOPT
$(OCAMLMKLIB) -o mlguestfs \
$(libguestfsocaml_a_OBJECTS) guestfs.cmx \
$(LDFLAGS) \
$(LTLIBINTL) \
-L$(top_builddir)/src/.libs -lguestfs
-L../src/.libs -lguestfs
endif
touch $@
libguestfsocaml_a_CPPFLAGS = \
-DGUESTFS_PRIVATE=1 \
-I$(top_builddir) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml \
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
-I$(top_srcdir)/src -I$(top_builddir)/src \
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib
@@ -93,7 +94,7 @@ libguestfsocaml_a_SOURCES = \
guestfs-c.c \
guestfs-c-actions.c \
guestfs-c-errnos.c \
../src/utils.c
../common/utils/utils.c
if HAVE_OCAMLDOC

View File

@@ -19,8 +19,6 @@
#ifndef GUESTFS_OCAML_C_H
#define GUESTFS_OCAML_C_H
#include "guestfs-internal-frontend.h"
#define Guestfs_val(v) (*((guestfs_h **)Data_custom_val(v)))
extern void guestfs_int_ocaml_raise_error (guestfs_h *g, const char *func)
Noreturn;