public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Jaeger <aj@suse.de>
To: GNU libc hacker <libc-hacker@sourceware.cygnus.com>
Subject: Fixes for nss_db
Date: Tue, 04 Jan 2000 08:28:00 -0000	[thread overview]
Message-ID: <u8g0wdstfg.fsf@gromit.rhein-neckar.de> (raw)

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

                 reply	other threads:[~2000-01-04  8:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u8g0wdstfg.fsf@gromit.rhein-neckar.de \
    --to=aj@suse.de \
    --cc=libc-hacker@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).