From: hjl@varesearch.com (H.J. Lu)
To: libc-hacker@sourceware.cygnus.com (GNU C Library)
Subject: A getxxx_r version patch
Date: Fri, 09 Jul 1999 16:28:00 -0000 [thread overview]
Message-ID: <19990709232852.2F64C3FC1@varesearch.com> (raw)
Since we changed the return value of getxxx_r, I added a new version
for each function and kept the old one.
--
H.J. Lu (hjl@gnu.org)
--
Fri Jul 9 14:36:25 1999 H.J. Lu <hjl@gnu.org>
* Versions.def (GLIBC_2.1.2): Added.
* nss/getXXent_r.c: Make the new ABI GLIBC_2.1.2 and keep the
old one as GLIBC_2.0.
* nss/getXXbyYY_r.c: Likewise.
* grp/Versions (getgrent_r, getgrgid_r, getgrnam_r): Added to
GLIBC_2.1.2.
* inet/Versions (getaliasbyname_r, getaliasent_r,
gethostbyaddr_r, gethostbyname2_r, gethostbyname_r,
gethostent_r, getnetbyaddr_r, getnetbyname_r, getnetent_r,
getnetgrent_r, getprotobyname_r, getprotobynumber_r,
getprotoent_r, getrpcbyname_r, getrpcbynumber_r, getrpcent_r,
getservbyname_r): Likewise.
* pwd/Versions (getpwent_r, getpwuid_r): Likewise.
* shadow/Versions (getspent_r, getspnam_r): Likewise.
Index: Versions.def
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/Versions.def,v
retrieving revision 1.1.1.5
diff -u -p -r1.1.1.5 Versions.def
--- Versions.def 1999/05/10 15:33:17 1.1.1.5
+++ Versions.def 1999/07/09 20:35:29
@@ -5,6 +5,7 @@ libc {
GLIBC_2.0
GLIBC_2.1 GLIBC_2.0
GLIBC_2.1.1 GLIBC_2.1
+ GLIBC_2.1.2 GLIBC_2.1.1
}
libcrypt {
GLIBC_2.0
Index: nss/getXXent_r.c
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/nss/getXXent_r.c,v
retrieving revision 1.1.1.10
diff -u -p -r1.1.1.10 getXXent_r.c
--- nss/getXXent_r.c 1999/06/27 01:14:34 1.1.1.10
+++ nss/getXXent_r.c 1999/07/09 21:08:58
@@ -290,5 +290,33 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYP
*result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
return status == NSS_STATUS_SUCCESS ? 0 : errno;
}
+#if defined SHARED && DO_VERSIONING
+#define OLD(name) OLD1 (name)
+#define OLD1(name) __old_##name
+
+int
+OLD (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
+ LOOKUP_TYPE **result H_ERRNO_PARM)
+{
+ int ret = INTERNAL (REENTRANT_GETNAME) (resbuf, buffer, buflen,
+ result H_ERRNO_VAR);
+
+ if (ret != 0)
+ ret = -1;
+
+ return ret;
+}
+
+#define do_symbol_version(real, name, version) \
+ symbol_version(real, name, version)
+do_symbol_version(OLD (REENTRANT_GETNAME), REENTRANT_GETNAME,
+ GLIBC_2.0);
+
+#define do_default_symbol_version(real, name, version) \
+ default_symbol_version(real, name, version)
+do_default_symbol_version(INTERNAL (REENTRANT_GETNAME),
+ REENTRANT_GETNAME, GLIBC_2.1.2);
+#else
#define do_weak_alias(n1, n2) weak_alias (n1, n2)
do_weak_alias (INTERNAL (REENTRANT_GETNAME), REENTRANT_GETNAME)
+#endif
Index: nss/getXXbyYY_r.c
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/nss/getXXbyYY_r.c,v
retrieving revision 1.1.1.15
diff -u -p -r1.1.1.15 getXXbyYY_r.c
--- nss/getXXbyYY_r.c 1999/06/27 01:14:33 1.1.1.15
+++ nss/getXXbyYY_r.c 1999/07/09 21:09:05
@@ -208,5 +208,32 @@ done:
return status == NSS_STATUS_SUCCESS ? 0 : errno;
}
+#if defined SHARED && DO_VERSIONING
+#define OLD(name) OLD1 (name)
+#define OLD1(name) __old_##name
+
+int
+OLD (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
+ size_t buflen, LOOKUP_TYPE **result H_ERRNO_PARM)
+{
+ int ret = INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, resbuf, buffer,
+ buflen, result H_ERRNO_VAR);
+
+ if (ret != 0)
+ ret = -1;
+
+ return ret;
+}
+
+#define do_symbol_version(real, name, version) \
+ symbol_version(real, name, version)
+do_symbol_version(OLD (REENTRANT_NAME), REENTRANT_NAME, GLIBC_2.0);
+
+#define do_default_symbol_version(real, name, version) \
+ default_symbol_version(real, name, version)
+do_default_symbol_version(INTERNAL (REENTRANT_NAME), REENTRANT_NAME,
+ GLIBC_2.1.2);
+#else
#define do_weak_alias(n1, n2) weak_alias (n1, (n2))
do_weak_alias (INTERNAL (REENTRANT_NAME), REENTRANT_NAME)
+#endif
Index: grp/Versions
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/grp/Versions,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 Versions
--- grp/Versions 1998/08/11 22:26:48 1.1.1.2
+++ grp/Versions 1999/07/09 20:30:13
@@ -20,4 +20,8 @@ libc {
# p*
putgrent;
}
+ GLIBC_2.1.2 {
+ # g*
+ getgrent_r; getgrgid_r; getgrnam_r;
+ }
}
Index: inet/Versions
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/inet/Versions,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 Versions
--- inet/Versions 1998/12/05 16:05:36 1.1.1.2
+++ inet/Versions 1999/07/09 20:31:55
@@ -54,4 +54,12 @@ libc {
# i*
if_freenameindex; if_indextoname; if_nameindex; if_nametoindex;
}
+ GLIBC_2.1.2 {
+ # g*
+ getaliasbyname_r; getaliasent_r; gethostbyaddr_r; gethostbyname2_r;
+ gethostbyname_r; gethostent_r; getnetbyaddr_r; getnetbyname_r;
+ getnetent_r; getnetgrent_r; getprotobyname_r; getprotobynumber_r;
+ getprotoent_r; getrpcbyname_r; getrpcbynumber_r; getrpcent_r;
+ getservbyname_r;
+ }
}
Index: pwd/Versions
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/pwd/Versions,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Versions
--- pwd/Versions 1998/07/15 00:20:03 1.1.1.1
+++ pwd/Versions 1999/07/09 20:25:45
@@ -12,4 +12,8 @@ libc {
# p*
putpwent; setpwent;
}
+ GLIBC_2.1.2 {
+ # g*
+ getpwent_r; getpwuid_r;
+ }
}
Index: shadow/Versions
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/shadow/Versions,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Versions
--- shadow/Versions 1998/07/15 00:20:09 1.1.1.1
+++ shadow/Versions 1999/07/09 20:29:55
@@ -24,4 +24,8 @@ libc {
# u*
ulckpwdf;
}
+ GLIBC_2.1.2 {
+ # g*
+ getspent_r; getspnam_r;
+ }
}
next reply other threads:[~1999-07-09 16:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-09 16:28 H.J. Lu [this message]
1999-07-10 5:43 ` Mark Kettenis
1999-07-10 8:15 ` H.J. Lu
1999-07-10 8:20 ` Thorsten Kukuk
1999-07-10 8:28 ` H.J. Lu
1999-07-10 9:24 ` Ulrich Drepper
[not found] <19990709213944.B199E3FC1@varesearch.com>
1999-07-09 20:50 ` 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=19990709232852.2F64C3FC1@varesearch.com \
--to=hjl@varesearch.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).