Skip to content

Commit 76a76bb

Browse files
committed
Fixed warnings and errors in configuration code
1 parent 6c33cbf commit 76a76bb

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### ?.??.? (????-??-??)
2+
3+
* Fixed warnings and errors in configuration code due to upstream changes.
4+
5+
16
### 4.3.2 (2017-11-27)
27

38
* Added missing -lpthread linking flag to avoid problems with projects

src/config/discover.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ let () =
5151
let cflags = split_ws cflags in
5252
if
5353
is_macosx ||
54-
try
55-
ignore (Caml.Sys.getenv "SQLITE3_DISABLE_LOADABLE_EXTENSIONS");
56-
true
57-
with Not_found -> false
54+
Option.is_some (
55+
Caml.Sys.getenv_opt "SQLITE3_DISABLE_LOADABLE_EXTENSIONS")
5856
then "-DSQLITE3_DISABLE_LOADABLE_EXTENSIONS" :: cflags
5957
else cflags
6058
| _ -> failwith "pkg-config failed to return cflags"
@@ -70,5 +68,4 @@ let () =
7068
Out_channel.write_all file ~data:(Sexp.to_string sexp)
7169
in
7270
write_sexp "c_flags.sexp" (sexp_of_list sexp_of_string conf.cflags);
73-
write_sexp "c_library_flags.sexp"
74-
(sexp_of_list sexp_of_string conf.libs))
71+
write_sexp "c_library_flags.sexp" (sexp_of_list sexp_of_string conf.libs))

0 commit comments

Comments
 (0)