diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-01-29 03:50:12 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-01-29 03:50:12 +0000 |
commit | 56552e4257910954051f3ff02c0ee2609c7ca688 (patch) | |
tree | 6660d07114fd608b08bc49225d600ffb84027a57 /nss | |
parent | 831372e7c1bb907f9f2c3d78909b15717b8ac095 (diff) | |
download | glibc-56552e4257910954051f3ff02c0ee2609c7ca688.zip glibc-56552e4257910954051f3ff02c0ee2609c7ca688.tar.gz glibc-56552e4257910954051f3ff02c0ee2609c7ca688.tar.bz2 |
update from main archive 970128cvs/libc-970129
1997-01-29 04:30 Ulrich Drepper <drepper@cygnus.com>
* sunrpc/Makefile: Don't generate headers derived from .x files when
crosscompiling.
1997-01-28 10:51 Richard Henderson <rth@tamu.edu>
* Makefile: Generate gnu/lib-names.h in before-compile.
* nss/nss.h (NSS_SHLIB_REVISION): Turn it into a const variable.
* nss/nssswitch.c (__nss_shlib_revision): New variable. Initialize
to the revision found for LIBNSS_FILES_SO.
(nss_initilized): Removed. It was tested but never set.
(nss_lookup_function): Don't treat NSS_SHLIB_REVISION as a literal.
* shlib-versions: Tag all alpha-linux shlibs with a .1 "minor"
not just libc. Except instead of ld.so.1.1 use ld-linux.so.2.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Typo in ldgp.
1997-01-28 12:16 Andreas Jaeger <aj@arthur.pfalz.de>
* elf/Makefile (CFLAGS-dl-load.c): Use += to not
override the definition.
1997-01-28 20:13 Fila Kolodny <fila@ibi.com>
* config.make.in (malloc): Remove.
Diffstat (limited to 'nss')
-rw-r--r-- | nss/nss.h | 5 | ||||
-rw-r--r-- | nss/nsswitch.c | 19 |
2 files changed, 14 insertions, 10 deletions
@@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,8 @@ #include <features.h> /* Revision number of NSS interface (must be a string). */ -#define NSS_SHLIB_REVISION ".1" +#define NSS_SHLIB_REVISION __nss_shlib_revision +extern const char *const __nss_shlib_revision; __BEGIN_DECLS diff --git a/nss/nsswitch.c b/nss/nsswitch.c index 1b061fa..201a2bc 100644 --- a/nss/nsswitch.c +++ b/nss/nsswitch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -27,6 +27,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <gnu/lib-names.h> #include "nsswitch.h" @@ -63,8 +64,8 @@ static struct __libc_lock_define_initialized (static, lock) -/* Nonzero if the sevices are already initialized. */ -static int nss_initialized; +/* String with revision number of the shared object files. */ +const char *const __nss_shlib_revision = LIBNSS_FILES_SO + 15; /* The root of the whole data base. */ @@ -88,7 +89,8 @@ __nss_database_lookup (const char *database, const char *alternate_name, return 0; } - if (nss_initialized == 0 && service_table == NULL) + /* Are we initialized yet? */ + if (service_table == NULL) /* Read config file. */ service_table = nss_parse_file (_PATH_NSSWITCH_CONF); @@ -330,7 +332,7 @@ nss_lookup_function (service_user *ni, const char *fct_name) { /* Load the shared library. */ size_t shlen = (7 + strlen (ni->library->name) + 3 - + sizeof (NSS_SHLIB_REVISION)); + + strlen (NSS_SHLIB_REVISION) + 1); char shlib_name[shlen]; void do_open (void) @@ -340,9 +342,10 @@ nss_lookup_function (service_user *ni, const char *fct_name) } /* Construct shared object name. */ - __stpcpy (__stpcpy (__stpcpy (shlib_name, "libnss_"), - ni->library->name), - ".so" NSS_SHLIB_REVISION); + __stpcpy (__stpcpy (__stpcpy (__stpcpy (shlib_name, "libnss_"), + ni->library->name), + ".so"), + NSS_SHLIB_REVISION); if (nss_dlerror_run (do_open) != 0) /* Failed to load the library. */ |