mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 00:10:10 +00:00
Update.
2001-08-19 Ulrich Drepper <drepper@redhat.com> * sunrpc/svcauth_des.c (_svcauth_des): Avoid using bcopy. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_mem.c: Likewise. * sunrpc/svc_authux.c (_svcauth_unix): Likewise. * sunrpc/rpc_cmsg.c: Likewise. * sunrpc/getrpcport.c (getrpcport): Likewise. * sunrpc/clnt_simp.c (callrpc): Likewise. * sunrpc/clnt_gen.c (clnt_create): Likewise. * string/envz.c: Likewise. * po/ko.po: Update from translation team. * argp/argp-help.c: Handle wide oriented stderr stream. * conform/conformtest.pl: <inttypes.h> test requires <stddef.h>.
This commit is contained in:
parent
091b895531
commit
9af652f608
18
ChangeLog
18
ChangeLog
@ -1,9 +1,25 @@
|
|||||||
|
2001-08-19 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sunrpc/svcauth_des.c (_svcauth_des): Avoid using bcopy.
|
||||||
|
* sunrpc/xdr_rec.c: Likewise.
|
||||||
|
* sunrpc/xdr_mem.c: Likewise.
|
||||||
|
* sunrpc/svc_authux.c (_svcauth_unix): Likewise.
|
||||||
|
* sunrpc/rpc_cmsg.c: Likewise.
|
||||||
|
* sunrpc/getrpcport.c (getrpcport): Likewise.
|
||||||
|
* sunrpc/clnt_simp.c (callrpc): Likewise.
|
||||||
|
* sunrpc/clnt_gen.c (clnt_create): Likewise.
|
||||||
|
* string/envz.c: Likewise.
|
||||||
|
|
||||||
|
* po/ko.po: Update from translation team.
|
||||||
|
|
||||||
|
* argp/argp-help.c: Handle wide oriented stderr stream.
|
||||||
|
|
||||||
2001-08-18 Ulrich Drepper <drepper@redhat.com>
|
2001-08-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/generic/strtol.c: Little optimizations. Add some
|
* sysdeps/generic/strtol.c: Little optimizations. Add some
|
||||||
__builtin_expect.
|
__builtin_expect.
|
||||||
|
|
||||||
* conform/conformtest.pl: <inttypes.h> test required <stddef.h>.
|
* conform/conformtest.pl: <inttypes.h> test requires <stddef.h>.
|
||||||
|
|
||||||
* wcsmbs/wchar.h (wcwdith): Change parameter type to wchar_t.
|
* wcsmbs/wchar.h (wcwdith): Change parameter type to wchar_t.
|
||||||
* wcsmbs/wcwidth.c (wcwdith): Likewise.
|
* wcsmbs/wcwidth.c (wcwdith): Likewise.
|
||||||
|
100
argp/argp-help.c
100
argp/argp-help.c
@ -1,5 +1,5 @@
|
|||||||
/* Hierarchial argument parsing help output
|
/* Hierarchial argument parsing help output
|
||||||
Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
|
Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||||
|
|
||||||
@ -52,6 +52,9 @@ char *alloca ();
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#ifdef USE_IN_LIBIO
|
||||||
|
# include <wchar.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _
|
#ifndef _
|
||||||
/* This is for other GNU distributions with internationalized messages. */
|
/* This is for other GNU distributions with internationalized messages. */
|
||||||
@ -1702,19 +1705,39 @@ __argp_error (const struct argp_state *state, const char *fmt, ...)
|
|||||||
|
|
||||||
__flockfile (stream);
|
__flockfile (stream);
|
||||||
|
|
||||||
fputs_unlocked (state ? state->name : program_invocation_short_name,
|
|
||||||
stream);
|
|
||||||
putc_unlocked (':', stream);
|
|
||||||
putc_unlocked (' ', stream);
|
|
||||||
|
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
vfprintf (stream, fmt, ap);
|
|
||||||
va_end (ap);
|
|
||||||
|
|
||||||
putc_unlocked ('\n', stream);
|
#ifdef USE_IN_LIBIO
|
||||||
|
if (_IO_fwide (stream, 0) > 0)
|
||||||
|
{
|
||||||
|
char *buf;
|
||||||
|
|
||||||
|
asprintf (&buf, fmt, ap);
|
||||||
|
|
||||||
|
fwprintf (stream, L"%s: %s\n",
|
||||||
|
state ? state->name : program_invocation_short_name,
|
||||||
|
buf);
|
||||||
|
|
||||||
|
free (buf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
fputs_unlocked (state
|
||||||
|
? state->name : program_invocation_short_name,
|
||||||
|
stream);
|
||||||
|
putc_unlocked (':', stream);
|
||||||
|
putc_unlocked (' ', stream);
|
||||||
|
|
||||||
|
vfprintf (stream, fmt, ap);
|
||||||
|
|
||||||
|
putc_unlocked ('\n', stream);
|
||||||
|
}
|
||||||
|
|
||||||
__argp_state_help (state, stream, ARGP_HELP_STD_ERR);
|
__argp_state_help (state, stream, ARGP_HELP_STD_ERR);
|
||||||
|
|
||||||
|
va_end (ap);
|
||||||
|
|
||||||
__funlockfile (stream);
|
__funlockfile (stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1743,29 +1766,68 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
|
|||||||
{
|
{
|
||||||
__flockfile (stream);
|
__flockfile (stream);
|
||||||
|
|
||||||
fputs_unlocked (state ? state->name : program_invocation_short_name,
|
#ifdef USE_IN_LIBIO
|
||||||
stream);
|
if (_IO_fwide (stream, 0) > 0)
|
||||||
|
fputws_unlocked (state
|
||||||
|
? state->name : program_invocation_short_name,
|
||||||
|
stream);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
fputs_unlocked (state
|
||||||
|
? state->name : program_invocation_short_name,
|
||||||
|
stream);
|
||||||
|
|
||||||
if (fmt)
|
if (fmt)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
putc_unlocked (':', stream);
|
|
||||||
putc_unlocked (' ', stream);
|
|
||||||
|
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
vfprintf (stream, fmt, ap);
|
#ifdef USE_IN_LIBIO
|
||||||
|
if (_IO_fwide (stream, 0) > 0)
|
||||||
|
{
|
||||||
|
char *buf;
|
||||||
|
|
||||||
|
asprintf (&buf, fmt, ap);
|
||||||
|
|
||||||
|
fwprintf (stream, L": %s", buf);
|
||||||
|
|
||||||
|
free (buf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
putc_unlocked (':', stream);
|
||||||
|
putc_unlocked (' ', stream);
|
||||||
|
|
||||||
|
vfprintf (stream, fmt, ap);
|
||||||
|
}
|
||||||
|
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errnum)
|
if (errnum)
|
||||||
{
|
{
|
||||||
putc_unlocked (':', stream);
|
char buf[200];
|
||||||
putc_unlocked (' ', stream);
|
|
||||||
fputs (strerror (errnum), stream);
|
#ifdef USE_IN_LIBIO
|
||||||
|
if (_IO_fwide (stream, 0) > 0)
|
||||||
|
fwprintf (stream, ": %s",
|
||||||
|
__strerror_r (errnum, buf, sizeof (buf)));
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
putc_unlocked (':', stream);
|
||||||
|
putc_unlocked (' ', stream);
|
||||||
|
fputs (__strerror_r (errnum, buf, sizeof (buf)), stream);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
putc_unlocked ('\n', stream);
|
#ifdef USE_IN_LIBIO
|
||||||
|
if (_IO_fwide (stream, 0) > 0)
|
||||||
|
putwc_unlocked (L'\n', stream);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
putc_unlocked ('\n', stream);
|
||||||
|
|
||||||
__funlockfile (stream);
|
__funlockfile (stream);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Routines for dealing with '\0' separated environment vectors
|
/* Routines for dealing with '\0' separated environment vectors
|
||||||
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Written by Miles Bader <miles@gnu.ai.mit.edu>
|
Written by Miles Bader <miles@gnu.ai.mit.edu>
|
||||||
|
|
||||||
@ -104,9 +104,9 @@ envz_add (char **envz, size_t *envz_len, const char *name, const char *value)
|
|||||||
|
|
||||||
if (new_envz)
|
if (new_envz)
|
||||||
{
|
{
|
||||||
bcopy (name, new_envz + old_envz_len, name_len);
|
memcpy (new_envz + old_envz_len, name, name_len);
|
||||||
new_envz[old_envz_len + name_len] = SEP;
|
new_envz[old_envz_len + name_len] = SEP;
|
||||||
bcopy (value, new_envz + old_envz_len + name_len + 1, value_len);
|
memcpy (new_envz + old_envz_len + name_len + 1, value, value_len);
|
||||||
new_envz[new_envz_len - 1] = 0;
|
new_envz[new_envz_len - 1] = 0;
|
||||||
|
|
||||||
*envz = new_envz;
|
*envz = new_envz;
|
||||||
@ -163,7 +163,7 @@ envz_strip (char **envz, size_t *envz_len)
|
|||||||
left -= entry_len;
|
left -= entry_len;
|
||||||
if (! index (entry, SEP))
|
if (! index (entry, SEP))
|
||||||
/* Null entry. */
|
/* Null entry. */
|
||||||
bcopy (entry, entry + entry_len, left);
|
memmove (entry + entry_len, entry, left);
|
||||||
else
|
else
|
||||||
entry += entry_len;
|
entry += entry_len;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
|
|||||||
sin.sin_family = h->h_addrtype;
|
sin.sin_family = h->h_addrtype;
|
||||||
sin.sin_port = 0;
|
sin.sin_port = 0;
|
||||||
__bzero (sin.sin_zero, sizeof (sin.sin_zero));
|
__bzero (sin.sin_zero, sizeof (sin.sin_zero));
|
||||||
bcopy (h->h_addr, (char *) &sin.sin_addr, h->h_length);
|
memcpy ((char *) &sin.sin_addr, h->h_addr, h->h_length);
|
||||||
|
|
||||||
prtbuflen = 1024;
|
prtbuflen = 1024;
|
||||||
prttmpbuf = __alloca (prtbuflen);
|
prttmpbuf = __alloca (prtbuflen);
|
||||||
|
@ -122,7 +122,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
|
|||||||
|
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
timeout.tv_sec = 5;
|
timeout.tv_sec = 5;
|
||||||
bcopy (hp->h_addr, (char *) &server_addr.sin_addr, hp->h_length);
|
memcpy ((char *) &server_addr.sin_addr, hp->h_addr, hp->h_length);
|
||||||
server_addr.sin_family = AF_INET;
|
server_addr.sin_family = AF_INET;
|
||||||
server_addr.sin_port = 0;
|
server_addr.sin_port = 0;
|
||||||
if ((crp->client = clntudp_create (&server_addr, (u_long) prognum,
|
if ((crp->client = clntudp_create (&server_addr, (u_long) prognum,
|
||||||
|
@ -67,7 +67,7 @@ getrpcport (const char *host, u_long prognum, u_long versnum, u_int proto)
|
|||||||
buffer = __alloca (buflen);
|
buffer = __alloca (buflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
bcopy (hp->h_addr, (char *) &addr.sin_addr, hp->h_length);
|
memcpy ((char *) &addr.sin_addr, hp->h_addr, hp->h_length);
|
||||||
addr.sin_family = AF_INET;
|
addr.sin_family = AF_INET;
|
||||||
addr.sin_port = 0;
|
addr.sin_port = 0;
|
||||||
return pmap_getport (&addr, prognum, versnum, proto);
|
return pmap_getport (&addr, prognum, versnum, proto);
|
||||||
|
@ -82,7 +82,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
|
|||||||
IXDR_PUT_INT32 (buf, oa->oa_length);
|
IXDR_PUT_INT32 (buf, oa->oa_length);
|
||||||
if (oa->oa_length)
|
if (oa->oa_length)
|
||||||
{
|
{
|
||||||
bcopy (oa->oa_base, (caddr_t) buf, oa->oa_length);
|
memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length);
|
||||||
buf = (int32_t *) ((char *) buf + RNDUP (oa->oa_length));
|
buf = (int32_t *) ((char *) buf + RNDUP (oa->oa_length));
|
||||||
}
|
}
|
||||||
oa = &cmsg->rm_call.cb_verf;
|
oa = &cmsg->rm_call.cb_verf;
|
||||||
@ -90,7 +90,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
|
|||||||
IXDR_PUT_INT32 (buf, oa->oa_length);
|
IXDR_PUT_INT32 (buf, oa->oa_length);
|
||||||
if (oa->oa_length)
|
if (oa->oa_length)
|
||||||
{
|
{
|
||||||
bcopy (oa->oa_base, (caddr_t) buf, oa->oa_length);
|
memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length);
|
||||||
/* no real need....
|
/* no real need....
|
||||||
buf = (long *) ((char *) buf + RNDUP(oa->oa_length));
|
buf = (long *) ((char *) buf + RNDUP(oa->oa_length));
|
||||||
*/
|
*/
|
||||||
@ -138,8 +138,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bcopy ((caddr_t) buf, oa->oa_base,
|
memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length);
|
||||||
oa->oa_length);
|
|
||||||
/* no real need....
|
/* no real need....
|
||||||
buf = (long *) ((char *) buf
|
buf = (long *) ((char *) buf
|
||||||
+ RNDUP(oa->oa_length));
|
+ RNDUP(oa->oa_length));
|
||||||
@ -179,8 +178,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bcopy ((caddr_t) buf, oa->oa_base,
|
memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length);
|
||||||
oa->oa_length);
|
|
||||||
/* no real need...
|
/* no real need...
|
||||||
buf = (long *) ((char *) buf
|
buf = (long *) ((char *) buf
|
||||||
+ RNDUP(oa->oa_length));
|
+ RNDUP(oa->oa_length));
|
||||||
|
@ -80,7 +80,7 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
|
|||||||
stat = AUTH_BADCRED;
|
stat = AUTH_BADCRED;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
bcopy ((caddr_t) buf, aup->aup_machname, (u_int) str_len);
|
memcpy (aup->aup_machname, (caddr_t) buf, (u_int) str_len);
|
||||||
aup->aup_machname[str_len] = 0;
|
aup->aup_machname[str_len] = 0;
|
||||||
str_len = RNDUP (str_len);
|
str_len = RNDUP (str_len);
|
||||||
buf = (int32_t *) ((char *) buf + str_len);
|
buf = (int32_t *) ((char *) buf + str_len);
|
||||||
|
@ -150,7 +150,7 @@ _svcauth_des (register struct svc_req *rqst, register struct rpc_msg *msg)
|
|||||||
return AUTH_BADCRED;
|
return AUTH_BADCRED;
|
||||||
}
|
}
|
||||||
cred->adc_fullname.name = area->area_netname;
|
cred->adc_fullname.name = area->area_netname;
|
||||||
bcopy ((char *) ixdr, cred->adc_fullname.name, namelen);
|
memcpy (cred->adc_fullname.name, (char *) ixdr, namelen);
|
||||||
cred->adc_fullname.name[namelen] = 0;
|
cred->adc_fullname.name[namelen] = 0;
|
||||||
ixdr += (RNDUP (namelen) / BYTES_PER_XDR_UNIT);
|
ixdr += (RNDUP (namelen) / BYTES_PER_XDR_UNIT);
|
||||||
cred->adc_fullname.key.key.high = *ixdr++;
|
cred->adc_fullname.key.key.high = *ixdr++;
|
||||||
|
@ -132,7 +132,7 @@ xdrmem_getbytes (XDR *xdrs, caddr_t addr, u_int len)
|
|||||||
{
|
{
|
||||||
if ((xdrs->x_handy -= len) < 0)
|
if ((xdrs->x_handy -= len) < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
bcopy (xdrs->x_private, addr, len);
|
memcpy (addr, xdrs->x_private, len);
|
||||||
xdrs->x_private += len;
|
xdrs->x_private += len;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ xdrmem_putbytes (XDR *xdrs, const char *addr, u_int len)
|
|||||||
{
|
{
|
||||||
if ((xdrs->x_handy -= len) < 0)
|
if ((xdrs->x_handy -= len) < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
bcopy (addr, xdrs->x_private, len);
|
memcpy (xdrs->x_private, addr, len);
|
||||||
xdrs->x_private += len;
|
xdrs->x_private += len;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,7 @@ xdrrec_putbytes (XDR *xdrs, const char *addr, u_int len)
|
|||||||
{
|
{
|
||||||
current = rstrm->out_boundry - rstrm->out_finger;
|
current = rstrm->out_boundry - rstrm->out_finger;
|
||||||
current = (len < current) ? len : current;
|
current = (len < current) ? len : current;
|
||||||
bcopy (addr, rstrm->out_finger, current);
|
memcpy (rstrm->out_finger, addr, current);
|
||||||
rstrm->out_finger += current;
|
rstrm->out_finger += current;
|
||||||
addr += current;
|
addr += current;
|
||||||
len -= current;
|
len -= current;
|
||||||
@ -588,7 +588,7 @@ get_input_bytes (RECSTREAM *rstrm, caddr_t addr, int len)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
current = (len < current) ? len : current;
|
current = (len < current) ? len : current;
|
||||||
bcopy (rstrm->in_finger, addr, current);
|
memcpy (addr, rstrm->in_finger, current);
|
||||||
rstrm->in_finger += current;
|
rstrm->in_finger += current;
|
||||||
addr += current;
|
addr += current;
|
||||||
len -= current;
|
len -= current;
|
||||||
|
Loading…
Reference in New Issue
Block a user