This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26-554-g2faa42d


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  2faa42daa886cc176dfc10fef2308c9191a6ec7f (commit)
      from  d8425e116cdd954fea0c04c0f406179b5daebbb3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2faa42daa886cc176dfc10fef2308c9191a6ec7f

commit 2faa42daa886cc176dfc10fef2308c9191a6ec7f
Author: Andreas Schwab <schwab@suse.de>
Date:   Tue Oct 10 14:09:02 2017 +0200

    nscd: remove reference to libnsl
    
    This removes the dependency on libnsl from nscd.  It only used __nis_hash,
    build its own copy under the name __nscd_hash.

diff --git a/ChangeLog b/ChangeLog
index 3c668d1..1a89064 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2017-10-11  Andreas Schwab  <schwab@suse.de>
+
+	* nis/Makefile (aux): Remove.
+	* nscd/Makefile (aux): Add nscd_hash.
+	(nscd-modules): Likewise.
+	($(objpfx)nscd): Don't depend on libnsl.
+	* nscd/nscd_hash.c: New file.
+	* nscd/nscd_hash.h: Likewise.
+	* nscd/cache.c: Include "nscd_hash.h" instead of <rpcsvc/nis.h>.
+	(cache_search, cache_add): Use __nscd_hash instead of __nis_hash.
+	* nscd/nscd_helper.c: Include <sys/param.h> and "nscd_hash.h"
+	instead of <nis/rpcsvc/nis.h>.
+	(__nscd_cache_search): Use __nscd_hash instead of __nis_hash.
+
 2017-10-11  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #22078]
diff --git a/nis/Makefile b/nis/Makefile
index 023916f..e602b09 100644
--- a/nis/Makefile
+++ b/nis/Makefile
@@ -22,8 +22,6 @@ subdir	:= nis
 
 include ../Makeconfig
 
-aux			:= nis_hash
-
 ifeq ($(build-obsolete-nsl),yes)
 headers			:= $(wildcard rpcsvc/*.[hx])
 
diff --git a/nscd/Makefile b/nscd/Makefile
index 4126996..095f3e5 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -25,7 +25,7 @@ include ../Makeconfig
 ifneq ($(use-nscd),no)
 routines := nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
 	    nscd_initgroups nscd_getserv_r nscd_netgroup
-aux	:= nscd_helper
+aux	:= nscd_helper nscd_hash
 endif
 
 # To find xmalloc.c
@@ -36,7 +36,7 @@ nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \
 		getsrvbynm_r getsrvbypt_r servicescache \
 		dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \
 		xmalloc xstrdup aicache initgrcache gai res_hconf \
-		netgroupcache
+		netgroupcache nscd_hash
 
 ifeq ($(build-nscd)$(have-thread-library),yesyes)
 
@@ -97,7 +97,7 @@ include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
 $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
 
 ifeq ($(build-shared),yes)
-$(objpfx)nscd: $(shared-thread-library) $(common-objpfx)nis/libnsl.so
+$(objpfx)nscd: $(shared-thread-library)
 else
-$(objpfx)nscd: $(static-thread-library) $(common-objpfx)nis/libnsl.a
+$(objpfx)nscd: $(static-thread-library)
 endif
diff --git a/nscd/cache.c b/nscd/cache.c
index b9dbc7a..4a17c33 100644
--- a/nscd/cache.c
+++ b/nscd/cache.c
@@ -25,7 +25,6 @@
 #include <string.h>
 #include <libintl.h>
 #include <arpa/inet.h>
-#include <rpcsvc/nis.h>
 #include <sys/mman.h>
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -33,6 +32,7 @@
 
 #include "nscd.h"
 #include "dbg_log.h"
+#include "nscd_hash.h"
 
 
 /* Wrapper functions with error checking for standard functions.  */
@@ -74,7 +74,7 @@ struct datahead *
 cache_search (request_type type, const void *key, size_t len,
 	      struct database_dyn *table, uid_t owner)
 {
-  unsigned long int hash = __nis_hash (key, len) % table->head->module;
+  unsigned long int hash = __nscd_hash (key, len) % table->head->module;
 
   unsigned long int nsearched = 0;
   struct datahead *result = NULL;
@@ -153,7 +153,7 @@ cache_add (int type, const void *key, size_t len, struct datahead *packet,
 	       first ? _(" (first)") : "");
     }
 
-  unsigned long int hash = __nis_hash (key, len) % table->head->module;
+  unsigned long int hash = __nscd_hash (key, len) % table->head->module;
   struct hashentry *newp;
 
   newp = mempool_alloc (table, sizeof (struct hashentry), 0);
diff --git a/nscd/nscd_hash.c b/nscd/nscd_hash.c
new file mode 100644
index 0000000..1572af6
--- /dev/null
+++ b/nscd/nscd_hash.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2017 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define __nis_hash __nscd_hash
+#include <nis/nis_hash.c>
diff --git a/nscd/nscd_hash.h b/nscd/nscd_hash.h
new file mode 100644
index 0000000..e56d710
--- /dev/null
+++ b/nscd/nscd_hash.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2017 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdint.h>
+
+extern uint32_t __nscd_hash (const void *__keyarg, size_t __len)
+  attribute_hidden;
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index 56e6d14..a42a4a7 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -27,6 +27,7 @@
 #include <unistd.h>
 #include <stdint.h>
 #include <sys/mman.h>
+#include <sys/param.h>
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
@@ -34,10 +35,10 @@
 #include <sys/uio.h>
 #include <sys/un.h>
 #include <not-cancel.h>
-#include <nis/rpcsvc/nis.h>
 #include <kernel-features.h>
 
 #include "nscd-client.h"
+#include "nscd_hash.h"
 
 
 /* Extra time we wait if the socket is still receiving data.  This
@@ -443,12 +444,6 @@ __nscd_get_map_ref (request_type type, const char *name,
 #define MINIMUM_HASHENTRY_SIZE \
   (offsetof (struct hashentry, dellist) + sizeof (int32_t))
 
-/* __nis_hash is defined in nis_hash.c which is included both libnsl
-   and libc.  Since the one in libnsl is exported and the one in libc
-   is hidden, __nis_hash is marked as hidden where it is referenced,
-   not where it is defined.  */
-extern __typeof (__nis_hash) __nis_hash attribute_hidden;
-
 /* Don't return const struct datahead *, as eventhough the record
    is normally constant, it can change arbitrarily during nscd
    garbage collection.  */
@@ -456,7 +451,7 @@ struct datahead *
 __nscd_cache_search (request_type type, const char *key, size_t keylen,
 		     const struct mapped_database *mapped, size_t datalen)
 {
-  unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module;
+  unsigned long int hash = __nscd_hash (key, keylen) % mapped->head->module;
   size_t datasize = mapped->datasize;
 
   ref_t trail = mapped->head->array[hash];

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   14 ++++++++++++++
 nis/Makefile                                       |    2 --
 nscd/Makefile                                      |    8 ++++----
 nscd/cache.c                                       |    6 +++---
 sysdeps/mips/tst-abi-fp32mod.c => nscd/nscd_hash.c |    9 +++------
 sysdeps/generic/nscd-types.h => nscd/nscd_hash.h   |    6 +++---
 nscd/nscd_helper.c                                 |   11 +++--------
 7 files changed, 30 insertions(+), 26 deletions(-)
 copy sysdeps/mips/tst-abi-fp32mod.c => nscd/nscd_hash.c (86%)
 copy sysdeps/generic/nscd-types.h => nscd/nscd_hash.h (83%)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]