bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in building libnss_compat


From: Andreas Jaeger
Subject: Re: Error in building libnss_compat
Date: 30 Apr 2001 07:22:54 +0200
User-agent: Gnus/5.090003 (Oort Gnus v0.03) XEmacs/21.1 (Channel Islands)

Bob McCracken <address@hidden> writes:

> In glibc-2.2.3 the enum "__niserr2nss_tab" and the int "__niserr2nss_count"
> are defined in nis/nss-nis.c. But the object file nss-nis.so is not linked in
> when libnss_compat is built, and therefore "make check" gets indefined
> references when testing libnss_compat.
> 
> In my previous glibc, 2.2.1, __niserr2nss_tab was defined in nis/nss-nis.h,
> which caused no problem, and __niserr2nss_count seems not to occur at all in
> that version.
> 
>       Bob McCracken

Here's a patch,

Andreas

2001-04-27  Ulrich Drepper  <address@hidden>

        * nis/nss-nis.h: Correct test for invalid error number.
        * nis/nss-nisplus.h: Likewise.

        * nis/Makefile (libnss_compat-rountines): Add nss-nisplus.


Index: nis/nss-nis.h
===================================================================
RCS file: /cvs/glibc/libc/nis/nss-nis.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- nis/nss-nis.h       2001/04/26 13:43:15     1.2
+++ nis/nss-nis.h       2001/04/28 02:17:52     1.3
@@ -31,9 +31,9 @@
 static inline enum nss_status
 yperr2nss (int errval)
 {
-  if ((unsigned int) errval > __yperr2nss_count)
+  if ((unsigned int) errval >= __yperr2nss_count)
     return NSS_STATUS_UNAVAIL;
-  return __yperr2nss_tab[errval];
+  return __yperr2nss_tab[(unsigned int) errval];
 }
 
 #endif /* nis/nss-nis.h */
Index: nis/nss-nisplus.h
===================================================================
RCS file: /cvs/glibc/libc/nis/nss-nisplus.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- nis/nss-nisplus.h   2001/04/26 13:52:40     1.4
+++ nis/nss-nisplus.h   2001/04/28 02:19:00     1.5
@@ -32,9 +32,9 @@
 static inline enum nss_status
 niserr2nss (int errval)
 {
-  if ((unsigned int) errval > __niserr2nss_count)
+  if ((unsigned int) errval >= __niserr2nss_count)
     return NSS_STATUS_UNAVAIL;
-  return __niserr2nss_tab[errval];
+  return __niserr2nss_tab[(unsigned int) errval];
 }
 
 #endif /* nis/nss-nisplus.h */
Index: nis/Makefile
===================================================================
RCS file: /cvs/glibc/libc/nis/Makefile,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- nis/Makefile        2001/04/26 13:53:05     1.26
+++ nis/Makefile        2001/04/28 04:20:43     1.27
@@ -55,7 +55,7 @@
                  nis_clone_res
 
 libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) \
-                          nisplus-parser nss-nis
+                          nisplus-parser nss-nis nss-nisplus
 libnss_compat-inhibit-o        = $(filter-out .os,$(object-suffixes))
 
 libnss_nis-routines    := $(addprefix nis-,$(databases)) nis-initgroups \


-- 
 Andreas Jaeger
  SuSE Labs address@hidden
   private address@hidden
    http://www.suse.de/~aj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]