summaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-05-26 04:47:00 +0000
committerUlrich Drepper <drepper@redhat.com>2004-05-26 04:47:00 +0000
commitffdd5e50e18b0cb212acad135e421d932cf3d3a2 (patch)
tree0a2b8dfc93270b99dbbb314cc68152ea2c5b230a /nis
parenta752d0cc542a891a086d486654a43212f1821360 (diff)
downloadglibc-ffdd5e50e18b0cb212acad135e421d932cf3d3a2.tar.gz
Update.
2004-05-25 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/fpu/Makefile: Make ld.so a dependency of libm.so. * sysdeps/powerpc/fpu/bits/mathinline.h [__LIBC_INERNAL_MATH_INLINES] (__ieee754_sqrt): Define as __MATH_INLINE using fsqrt instruction. (__ieee754_sqrtf): Define as __MATH_INLINE using fsqrts instruction. * sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Moved implementation from w_sqrt.c. * sysdeps/powerpc/fpu/e_sqrtf.c (__slow_ieee754_sqrtf): Moved implementation from w_sqrtf.c. * sysdeps/powerpc/fpu/w_sqrt.c (__sqrt): Wrapper implementation using inline __ieee754_sqrt(). * sysdeps/powerpc/fpu/w_sqrtf.c (__sqrtf): Wrapper implementation using inline __ieee754_sqrtf(). * sysdeps/powerpc/powerpc32/sysdep.h [__ASSEMBLER__]: Include <sysdeps/powerpc/sysdep.h> independent of __ASSEMBLER__. * sysdeps/powerpc/sysdep.h [__ASSEMBLER__] (PPC_FEATURE_*): Define PPC_FEATURE_* independent of __ASSEMBLER__. 2004-05-25 Jakub Jelinek <jakub@redhat.com> * sysdeps/pthread/aio_notify.c: Use <> instead of "" for aio_misc.h include. (aio_start_notify_thread): Define if not defined. (notify_func_wrapper): Use it. * sysdeps/pthread/aio_misc.c: Use <> instead of "" for aio_misc.h include. (aio_create_helper_thread): Define if not defined. (__aio_create_helper_thread): New function. (__aio_enqueue_request): Use aio_create_helper_thread. * nis/ypclnt.c (ypall_data, ypall_foreach): Remove. (struct ypresp_all_data): New type. (__xdr_ypresp_all): Change second argument to struct ypresp_all_data *. Replace ypall_foreach and ypall_data with objp->foreach and objp->data. (yp_all): Remove status variable, add data. Replace all uses of status with data.status. Initialize data.foreach and data.data instead of ypall_foreach and ypall_data. 2004-05-24 Jakub Jelinek <jakub@redhat.com> * elf/dl-lookup.c (add_dependency): Set DF_1_NODELETE bit in l_flags_1, not in l_flags.
Diffstat (limited to 'nis')
-rw-r--r--nis/ypclnt.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/nis/ypclnt.c b/nis/ypclnt.c
index d6e2205fd9..ab28e6002b 100644
--- a/nis/ypclnt.c
+++ b/nis/ypclnt.c
@@ -618,12 +618,16 @@ yp_order (const char *indomain, const char *inmap, unsigned int *outorder)
return YPERR_SUCCESS;
}
-static void *ypall_data;
-static int (*ypall_foreach) (int status, char *key, int keylen,
- char *val, int vallen, char *data);
+struct ypresp_all_data
+{
+ unsigned long status;
+ void *data;
+ int (*foreach) (int status, char *key, int keylen,
+ char *val, int vallen, char *data);
+};
static bool_t
-__xdr_ypresp_all (XDR *xdrs, u_long *objp)
+__xdr_ypresp_all (XDR *xdrs, struct ypresp_all_data *objp)
{
while (1)
{
@@ -633,13 +637,13 @@ __xdr_ypresp_all (XDR *xdrs, u_long *objp)
if (!xdr_ypresp_all (xdrs, &resp))
{
xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp);
- *objp = YP_YPERR;
+ objp->status = YP_YPERR;
return FALSE;
}
if (resp.more == 0)
{
xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp);
- *objp = YP_NOMORE;
+ objp->status = YP_NOMORE;
return TRUE;
}
@@ -656,24 +660,24 @@ __xdr_ypresp_all (XDR *xdrs, u_long *objp)
But we are allowed to add data behind the buffer,
if we don't modify the length. So add an extra NUL
character to avoid trouble with broken code. */
- *objp = YP_TRUE;
+ objp->status = YP_TRUE;
memcpy (key, resp.ypresp_all_u.val.key.keydat_val, keylen);
key[keylen] = '\0';
memcpy (val, resp.ypresp_all_u.val.val.valdat_val, vallen);
val[vallen] = '\0';
xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp);
- if ((*ypall_foreach) (*objp, key, keylen,
- val, vallen, ypall_data))
+ if ((*objp->foreach) (objp->status, key, keylen,
+ val, vallen, objp->data))
return TRUE;
}
break;
default:
- *objp = resp.ypresp_all_u.val.stat;
+ objp->status = resp.ypresp_all_u.val.stat;
xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp);
/* Sun says we don't need to make this call, but must return
immediatly. Since Solaris makes this call, we will call
the callback function, too. */
- (*ypall_foreach) (*objp, NULL, 0, NULL, 0, ypall_data);
+ (*objp->foreach) (objp->status, NULL, 0, NULL, 0, objp->data);
return TRUE;
}
}
@@ -689,7 +693,7 @@ yp_all (const char *indomain, const char *inmap,
enum clnt_stat result;
struct sockaddr_in clnt_sin;
CLIENT *clnt;
- unsigned long status;
+ struct ypresp_all_data data;
int clnt_sock;
int saved_errno = errno;
@@ -725,12 +729,12 @@ yp_all (const char *indomain, const char *inmap,
req.domain = (char *) indomain;
req.map = (char *) inmap;
- ypall_foreach = incallback->foreach;
- ypall_data = (void *) incallback->data;
+ data.foreach = incallback->foreach;
+ data.data = (void *) incallback->data;
result = clnt_call (clnt, YPPROC_ALL, (xdrproc_t) xdr_ypreq_nokey,
(caddr_t) &req, (xdrproc_t) __xdr_ypresp_all,
- (caddr_t) &status, RPCTIMEOUT);
+ (caddr_t) &data, RPCTIMEOUT);
if (result != RPC_SUCCESS)
{
@@ -744,10 +748,10 @@ yp_all (const char *indomain, const char *inmap,
clnt_destroy (clnt);
- if (res == YPERR_SUCCESS && status != YP_NOMORE)
+ if (res == YPERR_SUCCESS && data.status != YP_NOMORE)
{
__set_errno (saved_errno);
- return ypprot_err (status);
+ return ypprot_err (data.status);
}
++try;
}