aboutsummaryrefslogtreecommitdiff
path: root/nis/nss-nis.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-26 13:44:29 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-26 13:44:29 +0000
commit48a92e9d2da28b7bef8474f1effda68c13ed2fd1 (patch)
treea81cfcc7ce4b0f988aa371e72753837cc306a622 /nis/nss-nis.h
parent7cc7c0f7e76824d27ab2bde070620d84f42a89d7 (diff)
downloadglibc-48a92e9d2da28b7bef8474f1effda68c13ed2fd1.tar
glibc-48a92e9d2da28b7bef8474f1effda68c13ed2fd1.tar.gz
glibc-48a92e9d2da28b7bef8474f1effda68c13ed2fd1.tar.bz2
glibc-48a92e9d2da28b7bef8474f1effda68c13ed2fd1.zip
Update.
2001-04-26 Ulrich Drepper <drepper@redhat.com> * nis/nss-nis.h: Move yperr2nss_tab definition into separate file and rename to __yperr2nss_tab. Change YPERR_COUNT into variable __yperr2nss_count. * nis/nss-nis.c: New file. * nis/Makefile (libnss_compat-routines): Add nss-nis. (libnss_nis-routines): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Some more optimizations. Patch by Jakub Jelinek <jakub@redhat.com>.
Diffstat (limited to 'nis/nss-nis.h')
-rw-r--r--nis/nss-nis.h27
1 files changed, 4 insertions, 23 deletions
diff --git a/nis/nss-nis.h b/nis/nss-nis.h
index 13ba62ed9f..8d5ff5619a 100644
--- a/nis/nss-nis.h
+++ b/nis/nss-nis.h
@@ -25,34 +25,15 @@
/* Convert YP error number to NSS error number. */
-static enum nss_status yperr2nss_tab[] =
-{
- [YPERR_SUCCESS] = NSS_STATUS_SUCCESS,
- [YPERR_BADARGS] = NSS_STATUS_UNAVAIL,
- [YPERR_RPC] = NSS_STATUS_UNAVAIL,
- [YPERR_DOMAIN] = NSS_STATUS_UNAVAIL,
- [YPERR_MAP] = NSS_STATUS_UNAVAIL,
- [YPERR_KEY] = NSS_STATUS_NOTFOUND,
- [YPERR_YPERR] = NSS_STATUS_UNAVAIL,
- [YPERR_RESRC] = NSS_STATUS_TRYAGAIN,
- [YPERR_NOMORE] = NSS_STATUS_NOTFOUND,
- [YPERR_PMAP] = NSS_STATUS_UNAVAIL,
- [YPERR_YPBIND] = NSS_STATUS_UNAVAIL,
- [YPERR_YPSERV] = NSS_STATUS_UNAVAIL,
- [YPERR_NODOM] = NSS_STATUS_UNAVAIL,
- [YPERR_BADDB] = NSS_STATUS_UNAVAIL,
- [YPERR_VERS] = NSS_STATUS_UNAVAIL,
- [YPERR_ACCESS] = NSS_STATUS_UNAVAIL,
- [YPERR_BUSY] = NSS_STATUS_TRYAGAIN
-};
-#define YPERR_COUNT (sizeof (yperr2nss_tab) / sizeof (yperr2nss_tab[0]))
+extern const enum nss_status __yperr2nss_tab[];
+extern const unsigned int __yperr2nss_count;
static inline enum nss_status
yperr2nss (int errval)
{
- if ((unsigned int) errval > YPERR_COUNT)
+ if ((unsigned int) errval > __yperr2nss_count)
return NSS_STATUS_UNAVAIL;
- return yperr2nss_tab[errval];
+ return __yperr2nss_tab[errval];
}
#endif /* nis/nss-nis.h */