[gdbm] adding/removing patch files
Jan Horak
hhorak at fedoraproject.org
Fri Sep 30 13:22:33 UTC 2011
commit 2a8acaf6bc2ad824620232ade6594b798ac28acc
Author: Honza Horák <hhorak at redhat.com>
Date: Tue Sep 20 14:57:06 2011 +0200
adding/removing patch files
gdbm-1.8.3-fhs.patch | 138 --------------------
gdbm-1.8.3-filestruct.patch | 12 --
gdbm-1.8.3-ndbmlock.patch | 94 -------------
...3-shortread.patch => gdbm-1.9.1-shortread.patch | 66 +++++-----
...roheaders.patch => gdbm-1.9.1-zeroheaders.patch | 22 ++--
5 files changed, 42 insertions(+), 290 deletions(-)
---
diff --git a/gdbm-1.8.3-shortread.patch b/gdbm-1.9.1-shortread.patch
similarity index 59%
rename from gdbm-1.8.3-shortread.patch
rename to gdbm-1.9.1-shortread.patch
index 5b6455b..2612bea 100644
--- a/gdbm-1.8.3-shortread.patch
+++ b/gdbm-1.9.1-shortread.patch
@@ -1,9 +1,7 @@
-05_handle-short-read.patch
-
-diff -urNad a/bucket.c b/bucket.c
---- a/bucket.c 1999-05-19 01:16:05.000000000 +0100
-+++ b/bucket.c 2006-04-24 03:18:01.000000000 +0100
-@@ -31,7 +31,7 @@
+diff -up gdbm-1.9.1/src/bucket.c.shortread gdbm-1.9.1/src/bucket.c
+--- gdbm-1.9.1/src/bucket.c.shortread 2011-08-03 21:22:23.000000000 +0200
++++ gdbm-1.9.1/src/bucket.c 2011-08-24 18:34:39.501857203 +0200
+@@ -21,7 +21,7 @@
#include "autoconf.h"
#include "gdbmdefs.h"
@@ -12,34 +10,34 @@ diff -urNad a/bucket.c b/bucket.c
/* Initializing a new hash buckets sets all bucket entries to -1 hash value. */
void
-@@ -68,7 +68,8 @@
- int dir_index;
+@@ -53,7 +53,8 @@ void
+ _gdbm_get_bucket (GDBM_FILE dbf, int dir_index)
{
off_t bucket_adr; /* The address of the correct hash bucket. */
- int num_bytes; /* The number of bytes read. */
+ int num_bytes = 0; /* The total number of bytes read. */
+ int bytes_read; /* Number of bytes read in this syscall */
off_t file_pos; /* The return address for lseek. */
- register int index; /* Loop index. */
+ int index; /* Loop index. */
-@@ -111,7 +112,12 @@
+@@ -96,7 +97,12 @@ _gdbm_get_bucket (GDBM_FILE dbf, int dir
if (file_pos != bucket_adr)
_gdbm_fatal (dbf, "lseek error");
-- num_bytes = read (dbf->desc, dbf->bucket, dbf->header->bucket_size);
+- num_bytes = __read (dbf, dbf->bucket, dbf->header->bucket_size);
+ do
+ {
-+ bytes_read = read (dbf->desc, dbf->bucket+num_bytes, dbf->header->bucket_size-num_bytes);
++ bytes_read = __read (dbf, dbf->bucket+num_bytes, dbf->header->bucket_size-num_bytes);
+ if (bytes_read > 0) num_bytes += bytes_read;
+ }
+ while ((bytes_read > 0 || (bytes_read == -1 && errno == EINTR)) && num_bytes < dbf->header->bucket_size);
if (num_bytes != dbf->header->bucket_size)
_gdbm_fatal (dbf, "read error");
}
-diff -urNad a/falloc.c b/falloc.c
---- a/falloc.c 2006-04-24 03:17:54.000000000 +0100
-+++ b/falloc.c 2006-04-24 03:18:01.000000000 +0100
-@@ -31,7 +31,7 @@
+diff -up gdbm-1.9.1/src/falloc.c.shortread gdbm-1.9.1/src/falloc.c
+--- gdbm-1.9.1/src/falloc.c.shortread 2011-08-24 18:23:16.876903878 +0200
++++ gdbm-1.9.1/src/falloc.c 2011-08-24 18:36:15.877850610 +0200
+@@ -21,7 +21,7 @@
#include "autoconf.h"
#include "gdbmdefs.h"
@@ -48,9 +46,9 @@ diff -urNad a/falloc.c b/falloc.c
/* The forward definitions for this file. See the functions for
the definition of the function. */
-@@ -174,7 +174,8 @@
- pop_avail_block (dbf)
- gdbm_file_info *dbf;
+@@ -158,7 +158,8 @@ _gdbm_free (GDBM_FILE dbf, off_t file_ad
+ static void
+ pop_avail_block (GDBM_FILE dbf)
{
- int num_bytes; /* For use with the read system call. */
+ int num_bytes = 0; /* For use with the read system call. */
@@ -58,24 +56,24 @@ diff -urNad a/falloc.c b/falloc.c
off_t file_pos; /* For use with the lseek system call. */
avail_elem new_el;
avail_block *new_blk;
-@@ -199,7 +200,12 @@
+@@ -183,7 +184,12 @@ pop_avail_block (GDBM_FILE dbf)
/* Read the block. */
- file_pos = lseek (dbf->desc, new_el.av_adr, L_SET);
+ file_pos = __lseek (dbf, new_el.av_adr, L_SET);
if (file_pos != new_el.av_adr) _gdbm_fatal (dbf, "lseek error");
-- num_bytes = read (dbf->desc, new_blk, new_el.av_size);
+- num_bytes = __read (dbf, new_blk, new_el.av_size);
+ do
+ {
-+ bytes_read = read (dbf->desc, new_blk+num_bytes, new_el.av_size-num_bytes);
++ bytes_read = __read (dbf, new_blk+num_bytes, new_el.av_size-num_bytes);
+ if (bytes_read > 0) num_bytes += bytes_read;
+ }
+ while ((bytes_read > 0 || (bytes_read == -1 && errno == EINTR)) && num_bytes < new_el.av_size);
if (num_bytes != new_el.av_size) _gdbm_fatal (dbf, "read error");
/* Add the elements from the new block to the header. */
-diff -urNad a/findkey.c b/findkey.c
---- a/findkey.c 1999-05-19 01:16:06.000000000 +0100
-+++ b/findkey.c 2006-04-24 03:18:01.000000000 +0100
-@@ -31,6 +31,7 @@
+diff -up gdbm-1.9.1/src/findkey.c.shortread gdbm-1.9.1/src/findkey.c
+--- gdbm-1.9.1/src/findkey.c.shortread 2011-08-03 21:22:23.000000000 +0200
++++ gdbm-1.9.1/src/findkey.c 2011-08-24 18:37:00.591847528 +0200
+@@ -21,6 +21,7 @@
#include "autoconf.h"
#include "gdbmdefs.h"
@@ -83,9 +81,9 @@ diff -urNad a/findkey.c b/findkey.c
/* Read the data found in bucket entry ELEM_LOC in file DBF and
-@@ -41,11 +42,12 @@
- gdbm_file_info *dbf;
- int elem_loc;
+@@ -29,11 +30,12 @@
+ char *
+ _gdbm_read_entry (GDBM_FILE dbf, int elem_loc)
{
- int num_bytes; /* For seeking and reading. */
+ int num_bytes = 0; /* For seeking and reading. */
@@ -97,14 +95,14 @@ diff -urNad a/findkey.c b/findkey.c
/* Is it already in the cache? */
if (dbf->cache_entry->ca_data.elem_loc == elem_loc)
-@@ -74,7 +76,12 @@
- dbf->bucket->h_table[elem_loc].data_pointer, L_SET);
+@@ -61,7 +63,12 @@ _gdbm_read_entry (GDBM_FILE dbf, int ele
+ file_pos = __lseek (dbf, dbf->bucket->h_table[elem_loc].data_pointer, L_SET);
if (file_pos != dbf->bucket->h_table[elem_loc].data_pointer)
_gdbm_fatal (dbf, "lseek error");
-- num_bytes = read (dbf->desc, data_ca->dptr, key_size+data_size);
+- num_bytes = __read (dbf, data_ca->dptr, key_size+data_size);
+ do
+ {
-+ bytes_read = read (dbf->desc, data_ca->dptr+num_bytes, key_size+data_size-num_bytes);
++ bytes_read = __read (dbf, data_ca->dptr+num_bytes, key_size+data_size-num_bytes);
+ if (bytes_read > 0) num_bytes += bytes_read;
+ }
+ while ((bytes_read > 0 || (bytes_read == -1 && errno == EINTR)) && num_bytes < key_size+data_size);
diff --git a/gdbm-1.8.3-zeroheaders.patch b/gdbm-1.9.1-zeroheaders.patch
similarity index 65%
rename from gdbm-1.8.3-zeroheaders.patch
rename to gdbm-1.9.1-zeroheaders.patch
index 088956a..559714b 100644
--- a/gdbm-1.8.3-zeroheaders.patch
+++ b/gdbm-1.9.1-zeroheaders.patch
@@ -1,9 +1,7 @@
-02_zero-headers.patch by Jeff Johnson <jbj at redhat.com> and Colin Watson <cjwatson at debian.org>
-
-diff -urNad a/falloc.c b/falloc.c
---- a/falloc.c 2001-02-28 06:52:33.000000000 +0000
-+++ b/falloc.c 2003-09-08 23:58:43.000000000 +0100
-@@ -272,7 +272,7 @@
+diff -up gdbm-1.9.1/src/falloc.c.zeroheaders gdbm-1.9.1/src/falloc.c
+--- gdbm-1.9.1/src/falloc.c.zeroheaders 2011-08-03 21:22:23.000000000 +0200
++++ gdbm-1.9.1/src/falloc.c 2011-08-24 18:23:16.876903878 +0200
+@@ -255,7 +255,7 @@ push_avail_block (GDBM_FILE dbf)
/* Split the header block. */
@@ -12,10 +10,10 @@ diff -urNad a/falloc.c b/falloc.c
if (temp == NULL) _gdbm_fatal (dbf, "malloc error");
/* Set the size to be correct AFTER the pop_avail_block. */
temp->size = dbf->header->avail.size;
-diff -urNad a/gdbmopen.c b/gdbmopen.c
---- a/gdbmopen.c 2003-09-08 23:58:01.000000000 +0100
-+++ b/gdbmopen.c 2003-09-08 23:58:43.000000000 +0100
-@@ -212,7 +212,7 @@
+diff -up gdbm-1.9.1/src/gdbmopen.c.zeroheaders gdbm-1.9.1/src/gdbmopen.c
+--- gdbm-1.9.1/src/gdbmopen.c.zeroheaders 2011-08-12 22:22:52.000000000 +0200
++++ gdbm-1.9.1/src/gdbmopen.c 2011-08-24 18:23:16.877903878 +0200
+@@ -204,7 +204,7 @@ gdbm_open (const char *file, int block_s
file_block_size = block_size;
/* Get space for the file header. */
@@ -24,7 +22,7 @@ diff -urNad a/gdbmopen.c b/gdbmopen.c
if (dbf->header == NULL)
{
gdbm_close (dbf);
-@@ -256,7 +256,7 @@
+@@ -248,7 +248,7 @@ gdbm_open (const char *file, int block_s
(dbf->header->block_size - sizeof (hash_bucket))
/ sizeof (bucket_element) + 1;
dbf->header->bucket_size = dbf->header->block_size;
@@ -33,7 +31,7 @@ diff -urNad a/gdbmopen.c b/gdbmopen.c
if (dbf->bucket == NULL)
{
gdbm_close (dbf);
-@@ -420,7 +420,7 @@
+@@ -440,7 +440,7 @@ _gdbm_init_cache(GDBM_FILE dbf, size_t s
for(index = 0; index < size; index++)
{
(dbf->bucket_cache[index]).ca_bucket
More information about the scm-commits
mailing list