]> git.pld-linux.org Git - packages/ocaml.git/blobdiff - ocaml-db3.patch
- release 15 (by relup.sh)
[packages/ocaml.git] / ocaml-db3.patch
index 62b7a1b4247883b866f26a768d7984d23ccb3c28..30dc6dfdc797879435f5552cf24bc012897b722e 100644 (file)
@@ -1,26 +1,14 @@
-diff -ur ocaml-3.04--/otherlibs/dbm/cldbm.c ocaml-3.04/otherlibs/dbm/cldbm.c
---- ocaml-3.04--/otherlibs/dbm/cldbm.c Fri Dec  7 14:39:51 2001
-+++ ocaml-3.04/otherlibs/dbm/cldbm.c   Sat Feb  2 02:38:17 2002
-@@ -15,7 +15,8 @@
- #include <string.h>
- #include <fcntl.h>
--#include <ndbm.h>
-+#define DB_DBM_HSEARCH 1
-+#include <db.h>
- #include <mlvalues.h>
- #include <alloc.h>
- #include <memory.h>
-
-diff -ur ocaml-3.04/configure ocaml-3.04-/configure
---- ocaml-3.04/configure       Fri Dec  7 14:23:01 2001
-+++ ocaml-3.04-/configure      Mon Jun  3 15:25:25 2002
-@@ -1065,38 +1065,11 @@
+diff -urN ocaml-3.10.0.org/configure ocaml-3.10.0/configure
+--- ocaml-3.10.0.org/configure 2007-05-03 14:49:56.000000000 +0200
++++ ocaml-3.10.0/configure     2007-07-15 20:20:19.325848428 +0200
+@@ -1252,51 +1252,13 @@
  
  # See if we can compile the dbm library
  
 -dbm_include="not found"
 -dbm_link="not found"
  
  # See if we can compile the dbm library
  
 -dbm_include="not found"
 -dbm_link="not found"
+ use_gdbm_ndbm=no
 -for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
 -  if test -f $dir/ndbm.h; then
 -    dbm_include=$dir
 -for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
 -  if test -f $dir/ndbm.h; then
 -    dbm_include=$dir
@@ -32,13 +20,21 @@ diff -ur ocaml-3.04/configure ocaml-3.04-/configure
 -      dbm_link="-ldb1"
 -    elif sh ./hasgot -lgdbm dbm_open; then
 -      dbm_link="-lgdbm"
 -      dbm_link="-ldb1"
 -    elif sh ./hasgot -lgdbm dbm_open; then
 -      dbm_link="-lgdbm"
--    else
--      dbm_include="not found"
+-    elif sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
+-      dbm_link="-lgdbm_compat -lgdbm"
+-    fi
+-    break
+-  fi
+-  if test -f $dir/gdbm-ndbm.h; then
+-    dbm_include=$dir
+-    use_gdbm_ndbm=yes
+-    if sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
+-      dbm_link="-lgdbm_compat -lgdbm"
 -    fi
 -    break
 -  fi
 -done
 -    fi
 -    break
 -  fi
 -done
--if test "$dbm_include" = "not found"; then
+-if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
 -  echo "NDBM not found, the \"dbm\" library will not be supported."
 -else
 -  echo "NDBM found (in $dbm_include)"
 -  echo "NDBM not found, the \"dbm\" library will not be supported."
 -else
 -  echo "NDBM found (in $dbm_include)"
@@ -47,15 +43,29 @@ diff -ur ocaml-3.04/configure ocaml-3.04-/configure
 -  else
 -    dbm_include="-I$dbm_include"
 -  fi
 -  else
 -    dbm_include="-I$dbm_include"
 -  fi
--  echo "DBM_INCLUDES=$dbm_include" >> Makefile
--  echo "DBM_LINK=$dbm_link" >> Makefile
+-  if test "$use_gdbm_ndbm" = "yes"; then
+-    echo "#define DBM_USES_GDBM_NDBM" >> s.h
+-  fi
 -  otherlibraries="$otherlibraries dbm"
 -fi
 +dbm_include=""
 +dbm_link="-ldb"
 -  otherlibraries="$otherlibraries dbm"
 -fi
 +dbm_include=""
 +dbm_link="-ldb"
-+echo "DBM_INCLUDES=$dbm_include" >> Makefile
-+echo "DBM_LINK=$dbm_link" >> Makefile
+ echo "DBM_INCLUDES=$dbm_include" >> Makefile
+ echo "DBM_LINK=$dbm_link" >> Makefile
 +otherlibraries="$otherlibraries dbm"
  
  # Look for tcl/tk
  
 +otherlibraries="$otherlibraries dbm"
  
  # Look for tcl/tk
  
+diff -ur ocaml-3.07beta2/otherlibs/dbm/cldbm.c ocaml-3.07beta2-/otherlibs/dbm/cldbm.c
+--- ocaml-3.07beta2/otherlibs/dbm/cldbm.c      2003-07-08 15:50:31.000000000 +0200
++++ ocaml-3.07beta2-/otherlibs/dbm/cldbm.c     2003-08-26 11:11:19.000000000 +0200
+@@ -24,7 +24,8 @@
+ #ifdef DBM_USES_GDBM_NDBM
+ #include <gdbm-ndbm.h>
+ #else
+-#include <ndbm.h>
++#define DB_DBM_HSEARCH 1
++#include <db.h>
+ #endif
+ /* Quite close to sys_open_flags, but we need RDWR */
This page took 0.031823 seconds and 4 git commands to generate.