public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: hjl@varesearch.com (H.J. Lu)
To: libc-hacker@sourceware.cygnus.com (GNU C Library)
Cc: drepper@cygnus.com (Ulrich Drepper)
Subject: A patch for nscd
Date: Sun, 11 Jul 1999 17:44:00 -0000	[thread overview]
Message-ID: <19990712004406.560C93FC1@varesearch.com> (raw)

nscd has its own get[a-z]*_r functions. But nscd uses the weak names
to call those functions. As the result of my get[a-z]*_r version
change, which makes get[a-z]*_r strong instead of weak, and a linker
bug fix, the strong versions of get[a-z]*_r in libc.so are used. Here
is a patch to use nscd's own get[a-z]*_r functions.


-- 
H.J. Lu (hjl@gnu.org)
---
Sun Jul 11 17:36:43 1999  H.J. Lu  <hjl@gnu.org>

	* nscd/grpcache.c: Add prefix "__" to get[a-z]*_r () to get
	nscd's own strong version of the get[a-z]*_r function.
	* nscd/hstcache.c: Likwise.
	* nscd/pwdcache.c: Likwise.

Index: nscd/grpcache.c
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/nscd/grpcache.c,v
retrieving revision 1.1.1.9
diff -u -p -r1.1.1.9 grpcache.c
--- nscd/grpcache.c	1999/06/27 01:14:33	1.1.1.9
+++ nscd/grpcache.c	1999/07/12 00:29:58
@@ -208,7 +208,7 @@ addgrbyname (struct database *db, int fd
   if (debug_level > 0)
     dbg_log (_("Haven't found \"%s\" in group cache!"), key);
 
-  while (getgrnam_r (key, &resultbuf, buffer, buflen, &grp) != 0
+  while (__getgrnam_r (key, &resultbuf, buffer, buflen, &grp) != 0
 	 && errno == ERANGE)
     {
       errno = 0;
@@ -236,7 +236,7 @@ addgrbygid (struct database *db, int fd,
   if (debug_level > 0)
     dbg_log (_("Haven't found \"%d\" in group cache!"), gid);
 
-  while (getgrgid_r (gid, &resultbuf, buffer, buflen, &grp) != 0
+  while (__getgrgid_r (gid, &resultbuf, buffer, buflen, &grp) != 0
 	 && errno == ERANGE)
     {
       errno = 0;
Index: nscd/hstcache.c
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/nscd/hstcache.c,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 hstcache.c
--- nscd/hstcache.c	1999/06/27 01:14:33	1.1.1.3
+++ nscd/hstcache.c	1999/07/12 00:30:53
@@ -329,8 +329,8 @@ addhstbyaddr (struct database *db, int f
 	       inet_ntop (AF_INET, key, buf, sizeof (buf)));
     }
 
-  while (gethostbyaddr_r (key, INADDRSZ, AF_INET, &resultbuf, buffer, buflen,
-			  &hst, &h_errno) != 0
+  while (__gethostbyaddr_r (key, INADDRSZ, AF_INET, &resultbuf, buffer, buflen,
+			    &hst, &h_errno) != 0
 	 && h_errno == NETDB_INTERNAL
 	 && errno == ERANGE)
     {
@@ -396,8 +396,8 @@ addhstbyaddrv6 (struct database *db, int
 	       inet_ntop (AF_INET6, key, buf, sizeof (buf)));
     }
 
-  while (gethostbyaddr_r (key, IN6ADDRSZ, AF_INET6, &resultbuf, buffer, buflen,
-			  &hst, &h_errno) != 0
+  while (__gethostbyaddr_r (key, IN6ADDRSZ, AF_INET6, &resultbuf, buffer, buflen,
+			    &hst, &h_errno) != 0
 	 && h_errno == NETDB_INTERNAL
 	 && errno == ERANGE)
     {
Index: nscd/pwdcache.c
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/nscd/pwdcache.c,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 pwdcache.c
--- nscd/pwdcache.c	1999/06/27 01:14:33	1.1.1.6
+++ nscd/pwdcache.c	1999/07/12 00:31:29
@@ -206,7 +206,7 @@ addpwbyname (struct database *db, int fd
   if (debug_level > 0)
     dbg_log (_("Haven't found \"%s\" in password cache!"), key);
 
-  while (getpwnam_r (key, &resultbuf, buffer, buflen, &pwd) != 0
+  while (__getpwnam_r (key, &resultbuf, buffer, buflen, &pwd) != 0
 	 && errno == ERANGE)
     {
       errno = 0;
@@ -234,7 +234,7 @@ addpwbyuid (struct database *db, int fd,
   if (debug_level > 0)
     dbg_log (_("Haven't found \"%d\" in password cache!"), uid);
 
-  while (getpwuid_r (uid, &resultbuf, buffer, buflen, &pwd) != 0
+  while (__getpwuid_r (uid, &resultbuf, buffer, buflen, &pwd) != 0
 	 && errno == ERANGE)
     {
       errno = 0;

             reply	other threads:[~1999-07-11 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-11 17:44 H.J. Lu [this message]
     [not found] <199907120103.LAA00548@geoffk.wattle.id.au>
1999-07-12  9:19 ` H.J. Lu
1999-07-12 18:16   ` Ulrich Drepper

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=19990712004406.560C93FC1@varesearch.com \
    --to=hjl@varesearch.com \
    --cc=drepper@cygnus.com \
    --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).