AC_MSG_ERROR([Cannot find required OCaml package 'xml-light'])
fi
-AC_CHECK_OCAML_PKG(bitmatch)
-if test "x$pkg_bitmatch" != "xyes"; then
- AC_MSG_ERROR([Cannot find required OCaml package 'bitmatch'])
+AC_CHECK_OCAML_PKG(bitstring)
+if test "x$pkg_bitstring" != "xyes"; then
+ AC_MSG_ERROR([Cannot find required OCaml package 'bitstring'])
fi
dnl Check for optional OCaml packages.
AC_SUBST(pkg_extlib)
AC_SUBST(pkg_libvirt)
AC_SUBST(pkg_xml_light)
-AC_SUBST(pkg_bitmatch)
+AC_SUBST(pkg_bitstring)
AC_SUBST(pkg_gettext)
AC_SUBST(pkg_csv)
MKDIR_P = @MKDIR_P@
bindir = @bindir@
-SYNTAX = -syntax bitmatch.syntax
+SYNTAX = -syntax bitstring.syntax
-OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitmatch.syntax -I ../lib
+OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -I ../lib
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub
endif
OCAMLCFLAGS = @OCAMLCFLAGS@ $(SYNTAX)
-OCAMLCLIBS = -linkpkg bitmatch.cma ../lib/virt_mem.cma
+OCAMLCLIBS = -linkpkg ../lib/virt_mem.cma
OCAMLOPTFLAGS = @OCAMLOPTFLAGS@ $(SYNTAX)
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
-OCAMLOPTLIBS = -linkpkg bitmatch.cmxa ../lib/virt_mem.cmxa
+OCAMLOPTLIBS = -linkpkg ../lib/virt_mem.cmxa
OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX)
CC = @CC@
CFLAGS = @CFLAGS@ -Wall -Werror -I$(OCAMLLIB) -I@top_srcdir@
-SYNTAX = -syntax bitmatch.syntax
+SYNTAX = -syntax bitstring.syntax
-OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitmatch.syntax
+OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub
endif
OCAMLCFLAGS = @OCAMLCFLAGS@ $(SYNTAX)
-OCAMLCLIBS = -linkpkg bitmatch.cma
+OCAMLCLIBS = -linkpkg
OCAMLOPTFLAGS = @OCAMLOPTFLAGS@ $(SYNTAX)
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
-OCAMLOPTLIBS = -linkpkg bitmatch.cmxa
+OCAMLOPTLIBS = -linkpkg
OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX)
let set_endian = function
| "auto" -> def_endian := None
| "le" | "little" | "littleendian" | "intel" ->
- def_endian := Some Bitmatch.LittleEndian
+ def_endian := Some Bitstring.LittleEndian
| "be" | "big" | "bigendian" | "motorola" ->
- def_endian := Some Bitmatch.BigEndian
+ def_endian := Some Bitstring.BigEndian
| str -> failwith (sprintf (f_"set_endian: %s: unknown endianness") str)
in
(* Load the whole symbol table as a bitstring. *)
let ksymtab =
- Bitmatch.bitstring_of_string
+ Bitstring.bitstring_of_string
(MMap.get_bytes mem ksymtab_addr
(Int64.to_int ksymtab_size)) in
type ('a,'b) t = {
mappings : mapping list;
wordsize : wordsize option;
- endian : Bitmatch.endian option;
+ endian : Bitstring.endian option;
}
and mapping = {
start : addr;
let bits = bits_of_wordsize (get_wordsize t) in
let e = get_endian t in
let bs = BITSTRING { addr : bits : endian (e) } in
- Bitmatch.string_of_bitstring bs
+ Bitstring.string_of_bitstring bs
*)
-(* XXX bitmatch is missing 'construct_int64_le_unsigned' so we
+(* XXX bitstring is missing 'construct_int64_le_unsigned' so we
* have to force this to 32 bits for the moment.
*)
and string_of_addr t addr =
assert (bits = 32);
let e = get_endian t in
let bs = BITSTRING { Int64.to_int32 addr : 32 : endian (e) } in
- Bitmatch.string_of_bitstring bs
+ Bitstring.string_of_bitstring bs
and addr_of_string t str =
let bits = bits_of_wordsize (get_wordsize t) in
let e = get_endian t in
- let bs = Bitmatch.bitstring_of_string str in
+ let bs = Bitstring.bitstring_of_string str in
bitmatch bs with
| { addr : bits : endian (e) } -> addr
| { _ } -> invalid_arg "addr_of_string"
let get_int32 t addr =
let e = get_endian t in
let str = get_bytes t addr 4 in
- let bs = Bitmatch.bitstring_of_string str in
+ let bs = Bitstring.bitstring_of_string str in
bitmatch bs with
| { addr : 32 : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
let get_int64 t addr =
let e = get_endian t in
let str = get_bytes t addr 8 in
- let bs = Bitmatch.bitstring_of_string str in
+ let bs = Bitstring.bitstring_of_string str in
bitmatch bs with
| { addr : 64 : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
let e = get_endian t in
let bits = bits_of_wordsize ws in
let str = get_bytes t addr (bytes_of_wordsize ws) in
- let bs = Bitmatch.bitstring_of_string str in
+ let bs = Bitstring.bitstring_of_string str in
bitmatch bs with
| { addr : bits : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
(** Set the natural wordsize of the memory map. This is used
for matching pointers within the map and can be set only once. *)
-val set_endian : ('a, [`NoEndian]) t -> Bitmatch.endian ->
+val set_endian : ('a, [`NoEndian]) t -> Bitstring.endian ->
('a, [`Endian]) t
(** Set the natural endianness of the memory map. This is used
for matching pointers within the map and can be set only once. *)
val get_wordsize : ([`Wordsize], 'b) t -> Virt_mem_utils.wordsize
(** Return the wordsize previously set for this memory map. *)
-val get_endian : ('a, [`Endian]) t -> Bitmatch.endian
+val get_endian : ('a, [`Endian]) t -> Bitstring.endian
(** Return the endianness previously set for this memory map. *)
val of_file : Unix.file_descr -> addr -> ([`NoWordsize], [`NoEndian]) t
str)
let endian_of_architecture = function
- | I386 | X86_64 -> Bitmatch.LittleEndian
- | IA64 -> Bitmatch.LittleEndian (* XXX usually? *)
- | PPC | PPC64 | SPARC | SPARC64 -> Bitmatch.BigEndian
+ | I386 | X86_64 -> Bitstring.LittleEndian
+ | IA64 -> Bitstring.LittleEndian (* XXX usually? *)
+ | PPC | PPC64 | SPARC | SPARC64 -> Bitstring.BigEndian
type wordsize =
| W32 | W64
MKDIR_P = @MKDIR_P@
bindir = @bindir@
-SYNTAX = -syntax bitmatch.syntax
+SYNTAX = -syntax bitstring.syntax
-OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitmatch.syntax -I ../lib
+OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -I ../lib
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub
endif
OCAMLCFLAGS = @OCAMLCFLAGS@ $(SYNTAX)
-OCAMLCLIBS = -linkpkg bitmatch.cma ../lib/virt_mem.cma
+OCAMLCLIBS = -linkpkg bitstring.cma ../lib/virt_mem.cma
OCAMLOPTFLAGS = @OCAMLOPTFLAGS@ $(SYNTAX)
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
-OCAMLOPTLIBS = -linkpkg bitmatch.cmxa ../lib/virt_mem.cmxa
+OCAMLOPTLIBS = -linkpkg bitstring.cmxa ../lib/virt_mem.cmxa
OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX)
SOURCES = POTFILES
OCAML_GETTEXT = @OCAML_GETTEXT@
-OCAML_GETTEXT_EXTRACT_OPTIONS = --extract-default-option "-I +camlp4 pa_o.cmo -I $$(ocamlc -where)/bitmatch bitmatch.cma bitmatch_persistent.cma pa_bitmatch.cmo"
+OCAML_GETTEXT_EXTRACT_OPTIONS = --extract-default-option "-I +camlp4 pa_o.cmo -I $$(ocamlc -where)/bitstring bitstring.cma bitstring_persistent.cma pa_bitstring.cmo"
OCAML_GETTEXT_COMPILE_OPTIONS =
OCAML_GETTEXT_INSTALL_OPTIONS =
OCAML_GETTEXT_MERGE_OPTIONS =
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-07-15 15:49+0000\n"
+"POT-Creation-Date: 2008-07-17 17:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
MKDIR_P = @MKDIR_P@
bindir = @bindir@
-SYNTAX = -syntax bitmatch.syntax
+SYNTAX = -syntax bitstring.syntax
-OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitmatch.syntax -I ../lib
+OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -I ../lib
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub
endif
OCAMLCFLAGS = @OCAMLCFLAGS@ $(SYNTAX)
-OCAMLCLIBS = -linkpkg bitmatch.cma ../lib/virt_mem.cma
+OCAMLCLIBS = -linkpkg ../lib/virt_mem.cma
OCAMLOPTFLAGS = @OCAMLOPTFLAGS@ $(SYNTAX)
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
-OCAMLOPTLIBS = -linkpkg bitmatch.cmxa ../lib/virt_mem.cmxa
+OCAMLOPTLIBS = -linkpkg ../lib/virt_mem.cmxa
OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX)
MKDIR_P = @MKDIR_P@
bindir = @bindir@
-SYNTAX = -syntax bitmatch.syntax
+SYNTAX = -syntax bitstring.syntax
-OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitmatch.syntax -I ../lib
+OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -I ../lib
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub
endif
OCAMLCFLAGS = @OCAMLCFLAGS@ $(SYNTAX)
-OCAMLCLIBS = -linkpkg bitmatch.cma ../lib/virt_mem.cma
+OCAMLCLIBS = -linkpkg ../lib/virt_mem.cma
OCAMLOPTFLAGS = @OCAMLOPTFLAGS@ $(SYNTAX)
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
-OCAMLOPTLIBS = -linkpkg bitmatch.cmxa ../lib/virt_mem.cmxa
+OCAMLOPTLIBS = -linkpkg ../lib/virt_mem.cmxa
OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX)
try
let addr = lookup_ksym "init_uts_ns" in
- let bs = Bitmatch.bitstring_of_string (get_bytes mem addr (65*6+4)) in
+ let bs = Bitstring.bitstring_of_string (get_bytes mem addr (65*6+4)) in
(bitmatch bs with
| { _ : 32 : int; (* the kref, atomic_t, always 32 bits *)
new_utsname : -1 : bitstring } ->
let addr = lookup_ksym "system_utsname" in
let bs =
- Bitmatch.bitstring_of_string (get_bytes mem addr (65*6)) in
+ Bitstring.bitstring_of_string (get_bytes mem addr (65*6)) in
print_new_utsname name bs
with
Not_found ->