summary refs log tree commit diff
path: root/pkgs/development/libraries/db4
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-10-13 12:58:13 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-10-13 12:58:13 +0000
commit2e7e556d7e1b2e5d1a748aef3012a23caea5c21a (patch)
tree3c20c6745dad129d1f6abd6b6a593a0d53e528b8 /pkgs/development/libraries/db4
parent29e8bc140e32c0714d445298481a59998cafeed9 (diff)
downloadnixpkgs-2e7e556d7e1b2e5d1a748aef3012a23caea5c21a.tar
nixpkgs-2e7e556d7e1b2e5d1a748aef3012a23caea5c21a.tar.gz
nixpkgs-2e7e556d7e1b2e5d1a748aef3012a23caea5c21a.tar.bz2
nixpkgs-2e7e556d7e1b2e5d1a748aef3012a23caea5c21a.tar.lz
nixpkgs-2e7e556d7e1b2e5d1a748aef3012a23caea5c21a.tar.xz
nixpkgs-2e7e556d7e1b2e5d1a748aef3012a23caea5c21a.tar.zst
nixpkgs-2e7e556d7e1b2e5d1a748aef3012a23caea5c21a.zip
* Berkeley DB 4.5.20.
svn path=/nixpkgs/trunk/; revision=6729
Diffstat (limited to 'pkgs/development/libraries/db4')
-rw-r--r--pkgs/development/libraries/db4/cygwin-4.4.patch (renamed from pkgs/development/libraries/db4/cygwin.patch)0
-rw-r--r--pkgs/development/libraries/db4/cygwin-4.5.patch22
-rw-r--r--pkgs/development/libraries/db4/db4-4.4.nix (renamed from pkgs/development/libraries/db4/default.nix)2
-rw-r--r--pkgs/development/libraries/db4/db4-4.5.nix (renamed from pkgs/development/libraries/db4/db4-4.5.20.nix)5
4 files changed, 26 insertions, 3 deletions
diff --git a/pkgs/development/libraries/db4/cygwin.patch b/pkgs/development/libraries/db4/cygwin-4.4.patch
index 3f9d658b5da..3f9d658b5da 100644
--- a/pkgs/development/libraries/db4/cygwin.patch
+++ b/pkgs/development/libraries/db4/cygwin-4.4.patch
diff --git a/pkgs/development/libraries/db4/cygwin-4.5.patch b/pkgs/development/libraries/db4/cygwin-4.5.patch
new file mode 100644
index 00000000000..410106722a6
--- /dev/null
+++ b/pkgs/development/libraries/db4/cygwin-4.5.patch
@@ -0,0 +1,22 @@
+diff -rc db-4.5.20-orig/os/os_flock.c db-4.5.20/os/os_flock.c
+*** db-4.5.20-orig/os/os_flock.c	2006-10-13 12:36:12.000000000 +0200
+--- db-4.5.20/os/os_flock.c	2006-10-13 12:40:11.000000000 +0200
+***************
+*** 30,35 ****
+--- 30,44 ----
+  
+  	DB_ASSERT(dbenv, F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1);
+  
++ #ifdef __CYGWIN__
++ 	/*
++ 	 * Windows file locking interferes with read/write operations, so we
++ 	 * map the ranges to an area past the end of the file.
++ 	 */
++ 	DB_ASSERT(offset < (off_t) 1 << 62);
++ 	offset += (off_t) 1 << 62;
++ #endif
++ 
+  	fl.l_start = offset;
+  	fl.l_len = 1;
+  	fl.l_type = acquire ? F_WRLCK : F_UNLCK;
+Only in db-4.5.20/os: os_flock.c~
diff --git a/pkgs/development/libraries/db4/default.nix b/pkgs/development/libraries/db4/db4-4.4.nix
index 2b4246ff461..f17cc0ae24f 100644
--- a/pkgs/development/libraries/db4/default.nix
+++ b/pkgs/development/libraries/db4/db4-4.4.nix
@@ -11,4 +11,4 @@ stdenv.mkDerivation ({
     (if cxxSupport then "--enable-cxx" else "--disable-cxx")
     (if cxxSupport then "--enable-compat185" else "--disable-compat185")
   ];
-} // (if stdenv.system == "i686-cygwin" then {patches = [./cygwin.patch];} else {}))
+} // (if stdenv.system == "i686-cygwin" then {patches = [./cygwin-4.4.patch];} else {}))
diff --git a/pkgs/development/libraries/db4/db4-4.5.20.nix b/pkgs/development/libraries/db4/db4-4.5.nix
index 5c20b2f451f..9134c7f483b 100644
--- a/pkgs/development/libraries/db4/db4-4.5.20.nix
+++ b/pkgs/development/libraries/db4/db4-4.5.nix
@@ -1,6 +1,6 @@
 {stdenv, fetchurl, cxxSupport ? true, compat185 ? true}:
 
-stdenv.mkDerivation ({
+stdenv.mkDerivation {
   name = "db4-4.5.20";
   builder = ./builder.sh;
   src = fetchurl {
@@ -11,4 +11,5 @@ stdenv.mkDerivation ({
     (if cxxSupport then "--enable-cxx" else "--disable-cxx")
     (if cxxSupport then "--enable-compat185" else "--disable-compat185")
   ];
-} // (if stdenv.system == "i686-cygwin" then {patches = [./cygwin.patch];} else {}))
+  patches = [./cygwin-4.5.patch];
+}