]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 4 Jan 2000 17:51:12 +0000 (17:51 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 4 Jan 2000 17:51:12 +0000 (17:51 +0000)
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.

2000-01-04  Andreas Jaeger  <aj@suse.de>

* nss/nss_db/db-open.c (internal_setent): Check for db_open for
success, fix a memory leak and clean up function.

2000-01-04  Ulrich Drepper  <drepper@cygnus.com>

* Makefile (install): Pass $(install_root) to ldconfig.
Patch by Akira YOSHIYAMA <yosshy@tkf.att.ne.jp>.

2000-01-03  Jakub Jelinek  <jakub@redhat.com>

* soft-fp/op-1.h: Fix division for machines using not normalizing
version of udiv_qrnnd in longlong.h.
* soft-fp/sysdeps/mips/sfp-machine.h: Likewise.
* soft-fp/sysdeps/mips/mips64/sfp-machine.h: Likewise.
* soft-fp/sysdeps/sparc/sparc64/sfp-machine.h: Likewise.
Patch by Eddie C. Dost <ecd@skynet.be>.

* soft-fp/soft-fp.h (QItype, UQItype): New types used by longlong.h.

2000-01-03  Andreas Schwab  <schwab@suse.de>

* sysdeps/generic/dl-sysdep.c: Initialize __libc_multiple_libcs,
needed for change in common symbol handing in newer binutils.

ChangeLog
Makefile
nss/makedb.c
nss/nss_db/db-open.c
nss/nss_db/dummy-db.h
soft-fp/op-1.h
soft-fp/soft-fp.h
soft-fp/sysdeps/mips/mips64/sfp-machine.h
soft-fp/sysdeps/mips/sfp-machine.h
soft-fp/sysdeps/sparc/sparc64/sfp-machine.h
sysdeps/generic/dl-sysdep.c

index df09e6b07eae42949aa3d310eb536a8c259453af..79cdb1b2258bfbd076b96b8f3bb16373b4f2c7ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+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.
+
+2000-01-04  Andreas Jaeger  <aj@suse.de>
+
+       * nss/nss_db/db-open.c (internal_setent): Check for db_open for
+       success, fix a memory leak and clean up function.
+
+2000-01-04  Ulrich Drepper  <drepper@cygnus.com>
+
+       * Makefile (install): Pass $(install_root) to ldconfig.
+       Patch by Akira YOSHIYAMA <yosshy@tkf.att.ne.jp>.
+
+2000-01-03  Jakub Jelinek  <jakub@redhat.com>
+
+       * soft-fp/op-1.h: Fix division for machines using not normalizing
+       version of udiv_qrnnd in longlong.h.
+       * soft-fp/sysdeps/mips/sfp-machine.h: Likewise.
+       * soft-fp/sysdeps/mips/mips64/sfp-machine.h: Likewise.
+       * soft-fp/sysdeps/sparc/sparc64/sfp-machine.h: Likewise.
+       Patch by Eddie C. Dost <ecd@skynet.be>.
+
+       * soft-fp/soft-fp.h (QItype, UQItype): New types used by longlong.h.
+
+2000-01-03  Andreas Schwab  <schwab@suse.de>
+
+       * sysdeps/generic/dl-sysdep.c: Initialize __libc_multiple_libcs,
+       needed for change in common symbol handing in newer binutils.
+
 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
 
        * sysdeps/unix/sysv/linux/i386/mmap64.S: Fix code for running on
index de8507864d8f50740624acbab430618189b233ab..73812e18e1db0da601532fc64b79e363dcfc8f93 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -106,7 +106,7 @@ install-symbolic-link: subdir_install
 
 install:
        -test ! -x $(common-objpfx)elf/ldconfig || \
-         $(common-objpfx)elf/ldconfig $(inst_slibdir) $(inst_libdir)
+         $(common-objpfx)elf/ldconfig -r $(install_root) $(inst_slibdir) $(inst_libdir)
 ifneq (no,$(PERL))
 ifeq (/usr,$(prefix))
 ifeq (,$(install_root))
index d7662585e2da6b632561e6149272c875a2fd9161..62bea5c63db897f406ea643a33da37704eea287c 100644 (file)
@@ -91,10 +91,10 @@ static const char args_doc[] = N_("\
 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 @@ static struct argp argp =
 
 
 /* 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;
index c3a06794854a281c9475726856336fd235c013e7..75d39efaf64db6f191de747d4f5e98a04a0c3ab6 100644 (file)
@@ -118,6 +118,9 @@ internal_setent (const char *file, NSS_DB **dbp)
   enum nss_status status = NSS_STATUS_SUCCESS;
   int err;
   void *db;
+  int fd;
+  int result;
+
 
   if (*dbp == NULL)
     {
@@ -138,77 +141,71 @@ internal_setent (const char *file, NSS_DB **dbp)
       err = DL_CALL_FCT (libdb_db_open,
                         (file, DB_BTREE, DB_RDONLY, 0, NULL, NULL, &db));
 
+      if (err != 0)
+       {
+         __set_errno (err);
+         *dbp = NULL;
+         return err == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
+       }
+      
       /* Construct the object we pass up.  */
       *dbp = (NSS_DB *) malloc (sizeof (NSS_DB));
-      if (*dbp != NULL)
+      if (*dbp == NULL)
+       return NSS_STATUS_UNAVAIL;
+         
+      (*dbp)->db = db;
+
+      /* The functions are at different positions for the different
+        versions.  Sigh.  */
+      switch (libdb_version)
        {
-         (*dbp)->db = db;
-
-         /* The functions are at different positions for the different
-            versions.  Sigh.  */
-         switch (libdb_version)
-           {
-           case db24:
-             (*dbp)->close =
-               (int (*) (void *, uint32_t)) ((struct db24 *) db)->close;
-             (*dbp)->fd =
-               (int (*) (void *, int *)) ((struct db24 *) db)->fd;
-             (*dbp)->get =
-               (int (*) (void *, void *, void *, void *, uint32_t))
-               ((struct db24 *) db)->get;
-             break;
-           case db27:
-             (*dbp)->close =
-               (int (*) (void *, uint32_t)) ((struct db27 *) db)->close;
-             (*dbp)->fd =
-               (int (*) (void *, int *)) ((struct db27 *) db)->fd;
-             (*dbp)->get =
-               (int (*) (void *, void *, void *, void *, uint32_t))
-               ((struct db27 *) db)->get;
-             break;
-           default:
-             abort ();
-           }
+       case db24:
+         (*dbp)->close =
+           (int (*) (void *, uint32_t)) ((struct db24 *) db)->close;
+         (*dbp)->fd =
+           (int (*) (void *, int *)) ((struct db24 *) db)->fd;
+         (*dbp)->get =
+           (int (*) (void *, void *, void *, void *, uint32_t))
+           ((struct db24 *) db)->get;
+         break;
+       case db27:
+         (*dbp)->close =
+           (int (*) (void *, uint32_t)) ((struct db27 *) db)->close;
+         (*dbp)->fd =
+           (int (*) (void *, int *)) ((struct db27 *) db)->fd;
+         (*dbp)->get =
+           (int (*) (void *, void *, void *, void *, uint32_t))
+           ((struct db27 *) db)->get;
+         break;
+       default:
+         abort ();
        }
 
+      /* We have to make sure the file is `closed on exec'.  */
+      err = DL_CALL_FCT ((*dbp)->fd, (db, &fd));
       if (err != 0)
        {
          __set_errno (err);
-         *dbp = NULL;
-         status = err == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
+         result = -1;
        }
       else
        {
-         /* We have to make sure the file is `closed on exec'.  */
-         int fd;
-         int result;
-
-         err = DL_CALL_FCT ((*dbp)->fd, (db, &fd));
-         if (err != 0)
-           {
-             __set_errno (err);
-             result = -1;
-           }
-         else
-           {
-             int flags = result = fcntl (fd, F_GETFD, 0);
+         int flags = result = fcntl (fd, F_GETFD, 0);
 
-             if (result >= 0)
-               {
-                 flags |= FD_CLOEXEC;
-                 result = fcntl (fd, F_SETFD, flags);
-               }
-           }
-         if (result < 0)
+         if (result >= 0)
            {
-             /* Something went wrong.  Close the stream and return a
-                failure.  */
-             DL_CALL_FCT ((*dbp)->close, (db, 0));
-             status = NSS_STATUS_UNAVAIL;
+             flags |= FD_CLOEXEC;
+             result = fcntl (fd, F_SETFD, flags);
            }
-
-         if (result < 0)
-           *dbp = NULL;
+       }
+      if (result < 0)
+       {
+         /* Something went wrong.  Close the stream and return a
+            failure.  */
+         DL_CALL_FCT ((*dbp)->close, (db, 0));
+         status = NSS_STATUS_UNAVAIL;
+         free (*dbp);
+         *dbp = NULL;
        }
     }
 
index 600d51d9842cbd626b40ebdc83090de3e1bfc6dc..6ac8b77bb14fbe8cba9ea75178198585c594543b 100644 (file)
@@ -70,6 +70,7 @@ struct db24
   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 @@ struct db27
   void *mutexp;
   enum { dummy27 } type;
   int byteswapped;
+  int saved_open_fd;
   void *dbenv;
   void *mp_dbenv;
   void *internal;
@@ -114,9 +116,6 @@ struct db27
     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 @@ struct db27
   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 @@ struct dbc27
   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 48bf4ce7e2d6a84d914927eaaadc33da87095fad..53e0fce1b18d435657fd25d2a022d7ff9eda57cb 100644 (file)
 
 #define _FP_DIV_MEAT_1_udiv_norm(fs, R, X, Y)                          \
   do {                                                                 \
-    _FP_W_TYPE _nh, _nl, _q, _r;                                       \
+    _FP_W_TYPE _nh, _nl, _q, _r, _y;                                   \
                                                                        \
     /* Normalize Y -- i.e. make the most significant bit set.  */      \
-    Y##_f <<= _FP_WFRACXBITS_##fs - 1;                                 \
+    _y = Y##_f << _FP_WFRACXBITS_##fs;                                 \
                                                                        \
     /* Shift X op correspondingly high, that is, up one full word.  */ \
-    if (X##_f <= Y##_f)                                                        \
+    if (X##_f < Y##_f)                                                 \
       {                                                                        \
+       R##_e--;                                                        \
        _nl = 0;                                                        \
        _nh = X##_f;                                                    \
       }                                                                        \
     else                                                               \
       {                                                                        \
-       R##_e++;                                                        \
-       _nl = X##_f << (_FP_W_TYPE_SIZE-1);                             \
+       _nl = X##_f << (_FP_W_TYPE_SIZE - 1);                           \
        _nh = X##_f >> 1;                                               \
       }                                                                        \
                                                                        \
-    udiv_qrnnd(_q, _r, _nh, _nl, Y##_f);                               \
+    udiv_qrnnd(_q, _r, _nh, _nl, _y);                                  \
     R##_f = _q | (_r != 0);                                            \
   } while (0)
 
index 3c5072e51662389e2a7b1e98d24b80d91e23480f..26798ecf258e5d3a5bc98922479fbd4eec946df5 100644 (file)
@@ -159,8 +159,10 @@ do {                                               \
 #define UWtype         _FP_W_TYPE
 #define W_TYPE_SIZE    _FP_W_TYPE_SIZE
 
+typedef int QItype __attribute__((mode(QI)));
 typedef int SItype __attribute__((mode(SI)));
 typedef int DItype __attribute__((mode(DI)));
+typedef unsigned int UQItype __attribute__((mode(QI)));
 typedef unsigned int USItype __attribute__((mode(SI)));
 typedef unsigned int UDItype __attribute__((mode(DI)));
 #if _FP_W_TYPE_SIZE == 32
index 3f9d3abb8c523f7fcfb251470b743d1a3dca7c7b..730deae872399bd82b4b5db02b242668ed8527bd 100644 (file)
@@ -11,7 +11,7 @@
   _FP_MUL_MEAT_2_wide_3mul(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
 
 #define _FP_DIV_MEAT_S(R,X,Y)  _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm)
-#define _FP_DIV_MEAT_D(R,X,Y)  _FP_DIV_MEAT_1_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_D(R,X,Y)  _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y)
 #define _FP_DIV_MEAT_Q(R,X,Y)  _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
 
 #define _FP_NANFRAC_S          ((_FP_QNANBIT_S << 1) - 1)
index 575225a69b63dfebe5b17a1598cf2de14c2528ef..3b2a40f0e23c0db8be05ab80fd2e515b357a78af 100644 (file)
@@ -10,7 +10,7 @@
 #define _FP_MUL_MEAT_Q(R,X,Y)                          \
   _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
 
-#define _FP_DIV_MEAT_S(R,X,Y)  _FP_DIV_MEAT_1_udiv(S,R,X,Y)
+#define _FP_DIV_MEAT_S(R,X,Y)  _FP_DIV_MEAT_1_udiv_norm(S,R,X,Y)
 #define _FP_DIV_MEAT_D(R,X,Y)  _FP_DIV_MEAT_2_udiv(D,R,X,Y)
 #define _FP_DIV_MEAT_Q(R,X,Y)  _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
 
index 0d82c60a30b2b5be4ab73e11378e288a6787e7b2..4703dd070e07c3c8403fbc2dc83e99bba95d65bc 100644 (file)
@@ -49,7 +49,7 @@ do {                                                          \
                                _FP_MUL_MEAT_RESET_FE)
 
 #define _FP_DIV_MEAT_S(R,X,Y)  _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm)
-#define _FP_DIV_MEAT_D(R,X,Y)  _FP_DIV_MEAT_1_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_D(R,X,Y)  _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y)
 #define _FP_DIV_MEAT_Q(R,X,Y)  _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
 
 #define _FP_NANFRAC_S          ((_FP_QNANBIT_S << 1) - 1)
index 4f2a2f6da3aea28cc2197d9500fce48e25950cca..784e7adb5e2334f38489f3bf78b686d78cd28e1a 100644 (file)
@@ -47,7 +47,7 @@ extern void ENTRY_POINT (void);
 
 ElfW(Addr) _dl_base_addr;
 int __libc_enable_secure;
-int __libc_multiple_libcs;     /* Defining this here avoids the inclusion
+int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
                                   of init-first.  */
 /* This variable contains the lowest stack address ever used.  */
 void *__libc_stack_end;