Skip to content

Commit

Permalink
Remove StringCompat, bump required OCaml version.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jun 8, 2019
1 parent df4aad5 commit a5a887d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 26 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=====
* More cleanup.
* Make sure input samples always fall withing the [-1;1] range. (#6)
* Remove StringCompat, bump OCaml version to >= 4.03

0.1.4 (23-01-2019)
=====
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Please read the COPYING file before using this software.
Prerequisites:
==============

- ocaml >= 3.10.2 (haven't tried earlier versions)
- ocaml >= 4.03.0

- flac >= 1.2.1 (haven't tried earlier versions)

Expand Down
15 changes: 15 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ CFLAGS="$CFLAGS -I .."
# Check endianess
AC_C_BIGENDIAN(AC_DEFINE([BIGENDIAN], [1], [The target is big endian]),[])

OCAML_VERSION="`$OCAMLC -version`"
OCAML_MAJOR="`echo $OCAML_VERSION | cut -d'.' -f 1`"
AC_SUBST(OCAML_MAJOR)
OCAML_MINOR="`echo $OCAML_VERSION | cut -d'.' -f 2`"
AC_SUBST(OCAML_MINOR)
OCAML_REVISION="`echo $OCAML_VERSION | cut -d'.' -f 3`"
AC_SUBST(OCAML_REVISION)
AC_MSG_CHECKING([for ocamlc version])
AC_MSG_RESULT([$OCAML_MAJOR.$OCAML_MINOR.$OCAML_REVISION])

AC_OCAML_COMPARE_VERSION([$OCAML_MAJOR.$OCAML_MINOR.$OCAML_REVISION],[4.03.0])
if test -z "${VERSION_OK}"; then
AC_MSG_ERROR([version 4.03.0 or more of the OCaml compiler is required to build liquidsoap])
fi

# Ogg variables
OCAMLOGG_REQUIRES="ogg"
OCAMLOGG_META="package \"ogg\" (
Expand Down
26 changes: 1 addition & 25 deletions src/flac.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,6 @@ exception Internal
let () =
Callback.register_exception "flac_exn_internal" Internal

exception Not_implemented

module type StringWrapper =
sig
include module type of String
val uppercase : string -> string
end

module StringWrapper : StringWrapper =
struct
let uppercase _ = raise Not_implemented
let () =
try ignore(uppercase "") with Not_implemented -> ()
include String
end

module StringCompat =
struct
let uppercase_ascii = StringWrapper.uppercase
let () =
try ignore(uppercase_ascii "") with Not_implemented -> ()
include String
end

module Decoder =
struct
type 'a dec
Expand Down Expand Up @@ -126,7 +102,7 @@ struct
String.index_from comment 0 '='
in
let c1 =
StringCompat.uppercase_ascii (String.sub comment 0 equal_pos)
String.uppercase_ascii (String.sub comment 0 equal_pos)
in
let c2 =
String.sub comment (equal_pos + 1) ((String.length comment) - equal_pos - 1)
Expand Down

0 comments on commit a5a887d

Please sign in to comment.