summaryrefslogtreecommitdiff
path: root/databases/ocaml-mysql/patches
diff options
context:
space:
mode:
authorjaapb <jaapb>2016-07-02 09:42:14 +0000
committerjaapb <jaapb>2016-07-02 09:42:14 +0000
commit6a343dc37aa3424335e6b40245584431b94fcfd3 (patch)
treed085c673ebd4ebf058acbce904fa0cb2eb898800 /databases/ocaml-mysql/patches
parentdab48412c52906b670d99787058c36115025c1ca (diff)
downloadpkgsrc-6a343dc37aa3424335e6b40245584431b94fcfd3.tar.gz
Updated package to latest version, 1.2.0; updated package to work with
ocaml.mk framework and added patch to support int64 properly (patch from upstream). Changes include: * Tue Mar 10 2015 (1.2.0) * Get rid of Camlp4 dependency * Use mysql_config in configure * Thu Oct 16 2014 (1.1.3) * + OPT_FOUND_ROWS (Dmitry Grebeniuk) * configure: build with percona
Diffstat (limited to 'databases/ocaml-mysql/patches')
-rw-r--r--databases/ocaml-mysql/patches/patch-mysql_stubs.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/databases/ocaml-mysql/patches/patch-mysql_stubs.c b/databases/ocaml-mysql/patches/patch-mysql_stubs.c
new file mode 100644
index 00000000000..7067ad50f3a
--- /dev/null
+++ b/databases/ocaml-mysql/patches/patch-mysql_stubs.c
@@ -0,0 +1,40 @@
+$NetBSD: patch-mysql_stubs.c,v 1.1 2016/07/02 09:42:14 jaapb Exp $
+
+Use C99 int64_t (patch from upstream)
+--- mysql_stubs.c.orig 2015-03-10 02:55:27.000000000 +0000
++++ mysql_stubs.c
+@@ -507,15 +507,15 @@ db_fetch (value result)
+ }
+
+ EXTERNAL value
+-db_to_row(value result, value offset) {
+- int64 off = Int64_val(offset);
++db_to_row(value result, value offset){
++ int64_t off = Int64_val(offset);
+ MYSQL_RES *res;
+
+ res = RESval(result);
+ if (!res)
+ mysqlfailwith("Mysql.to_row: result did not return fetchable data");
+
+- if (off < 0 || off > (int64)mysql_num_rows(res)-1)
++ if (off < 0 || off > (int64_t)mysql_num_rows(res)-1)
+ invalid_argument("Mysql.to_row: offset out of range");
+
+ mysql_data_seek(res, off);
+@@ -640,13 +640,13 @@ db_size(value result)
+ {
+ CAMLparam1(result);
+ MYSQL_RES *res;
+- int64 size;
++ int64_t size;
+
+ res = RESval(result);
+ if (!res)
+ size = 0;
+ else
+- size = (int64)(mysql_num_rows(res));
++ size = (int64_t)(mysql_num_rows(res));
+
+ CAMLreturn(copy_int64(size));
+ }