* Fixes for nss_db
@ 2000-01-04 8:28 Andreas Jaeger
0 siblings, 0 replies; only message in thread
From: Andreas Jaeger @ 2000-01-04 8:28 UTC (permalink / raw)
To: GNU libc hacker
Here're some fixes for the structs and a small cleanup patch for
makedb.c. I checked db24, dbc24, db27 and dbc27 against the versions
in glibc 2.1 and the removed version from glibc 2.2 and against db
2.7.7.
Andreas
2000-01-04 Andreas Jaeger <aj@suse.de>
* nss/nss_db/dummy-db.h (struct db24): Add missing field flags.
(struct db27): Add missing fields byteswapped, join and flags;
remove wrong member handleq.
(struct dbc27): Correct lock field.
* nss/makedb.c: Remove __P.
============================================================
Index: nss/nss_db/dummy-db.h
--- nss/nss_db/dummy-db.h 2000/01/02 08:37:55 1.2
+++ nss/nss_db/dummy-db.h 2000/01/04 16:15:26
@@ -70,6 +70,7 @@
int (*put) (void *, void *, DBT *, DBT *, uint32_t);
int (*stat) (void *, void *, void *(*)(size_t), uint32_t);
int (*sync) (void *, uint32_t);
+ uint32_t flags;
};
@@ -99,6 +100,7 @@
void *mutexp;
enum { dummy27 } type;
int byteswapped;
+ int saved_open_fd;
void *dbenv;
void *mp_dbenv;
void *internal;
@@ -114,9 +116,6 @@
void *tqh_first;
void **tqh_last;
} active_queue;
- struct {
- void *lh_first;
- } handleq;
uint8_t fileid[20];
uint32_t log_fileid;
size_t pgsize;
@@ -130,9 +129,11 @@
int (*del) (void *, void *, DBT *, uint32_t);
int (*fd) (void *, int *);
int (*get) (void *, void *, DBT *, DBT *, uint32_t);
+ int (*join) (void *, void **, uint32_t, void **);
int (*put) (void *, void *, DBT *, DBT *, uint32_t);
int (*stat) (void *, void *, void *(*)(size_t), uint32_t);
int (*sync) (void *, uint32_t);
+ uint32_t flags;
};
@@ -148,7 +149,10 @@
uint32_t lid;
uint32_t locker;
DBT lock_dbt;
- uint32_t lock[14];
+ struct{
+ uint32_t pgno;
+ uint8_t fileid[20];
+ } lock;
size_t mylock;
DBT rkey;
DBT rdata;
============================================================
Index: nss/makedb.c
--- nss/makedb.c 2000/01/02 08:45:26 1.2
+++ nss/makedb.c 2000/01/04 16:15:26
@@ -91,10 +91,10 @@
INPUT-FILE OUTPUT-FILE\n-o OUTPUT-FILE INPUT-FILE\n-u INPUT-FILE");
/* Prototype for option handler. */
-static error_t parse_opt __P ((int key, char *arg, struct argp_state *state));
+static error_t parse_opt (int key, char *arg, struct argp_state *state);
/* Function to print some extra text in the help message. */
-static char *more_help __P ((int key, const char *text, void *input));
+static char *more_help (int key, const char *text, void *input);
/* Data structure to communicate with argp functions. */
static struct argp argp =
@@ -104,17 +104,14 @@
/* Prototypes for local functions. */
-static int process_input __P ((FILE *input, const char *inname, NSS_DB *output,
- int to_lowercase, int be_quiet));
-static int print_database __P ((NSS_DB *db));
+static int process_input (FILE *input, const char *inname, NSS_DB *output,
+ int to_lowercase, int be_quiet);
+static int print_database (NSS_DB *db);
static NSS_DB *dbopen (const char *fname, int oper, int mode);
-int main __P ((int argc, char *argv[]));
int
-main (argc, argv)
- int argc;
- char *argv[];
+main (int argc, char *argv[])
{
const char *input_name;
FILE *input_file;
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-01-04 8:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-04 8:28 Fixes for nss_db Andreas Jaeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).