1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

update from main archive 960105

This commit is contained in:
Ulrich Drepper
1997-01-06 22:07:28 +00:00
parent 6f9e7002f3
commit df4ef2ab9c
131 changed files with 5591 additions and 1845 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -119,12 +119,12 @@ typedef union querybuf
static enum nss_status getanswer_r (const querybuf *answer, int anslen,
const char *qname, int qtype,
struct hostent *result,
char *buffer, int buflen, int *h_errnop);
struct hostent *result, char *buffer,
size_t buflen, int *h_errnop);
enum nss_status
_nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
char *buffer, int buflen, int *h_errnop)
char *buffer, size_t buflen, int *h_errnop)
{
struct host_data
{
@ -253,7 +253,7 @@ _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
enum nss_status
_nss_dns_gethostbyname_r (const char *name, struct hostent *result,
char *buffer, int buflen, int *h_errnop)
char *buffer, size_t buflen, int *h_errnop)
{
enum nss_status status = NSS_STATUS_NOTFOUND;
@ -270,7 +270,7 @@ _nss_dns_gethostbyname_r (const char *name, struct hostent *result,
enum nss_status
_nss_dns_gethostbyaddr_r (const char *addr, int len, int af,
struct hostent *result, char *buffer, int buflen,
struct hostent *result, char *buffer, size_t buflen,
int *h_errnop)
{
static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
@ -368,7 +368,8 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af,
static enum nss_status
getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
struct hostent *result, char *buffer, int buflen, int *h_errnop)
struct hostent *result, char *buffer, size_t buflen,
int *h_errnop)
{
struct host_data
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -99,12 +99,12 @@ typedef union querybuf
/* Prototypes for local functions. */
static enum nss_status getanswer_r (const querybuf *answer, int anslen,
struct netent *result, char *buffer,
int buflen, lookup_method net_i);
size_t buflen, lookup_method net_i);
enum nss_status
_nss_dns_getnetbyname_r (const char *name, struct netent *result,
char *buffer, int buflen)
char *buffer, size_t buflen)
{
/* Return entry for network with NAME. */
querybuf net_buffer;
@ -127,7 +127,7 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result,
enum nss_status
_nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
char *buffer, int buflen)
char *buffer, size_t buflen)
{
/* Return entry for network with NAME. */
enum nss_status status;
@ -196,7 +196,7 @@ _nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
static enum nss_status
getanswer_r (const querybuf *answer, int anslen, struct netent *result,
char *buffer, int buflen, lookup_method net_i)
char *buffer, size_t buflen, lookup_method net_i)
{
/*
* Find first satisfactory answer

View File

@ -805,7 +805,7 @@ __p_rr(cp, msg, file)
n, c);
/* orig ttl */
n = _getlong((u_char*)cp);
if (n != tmpttl)
if ((u_int32_t) n != tmpttl)
fprintf(file, " %u", n);
cp += INT32SZ;
/* sig expire */
@ -1434,7 +1434,7 @@ loc_ntoa(binary, ascii)
longval = (templ - ((unsigned)1<<31));
GETLONG(templ, cp);
if (templ < referencealt) { /* below WGS 84 spheroid */
if (templ < (u_int32_t) referencealt) { /* below WGS 84 spheroid */
altval = referencealt - templ;
altsign = -1;
} else {

View File

@ -340,7 +340,8 @@ res_querydomain(name, domain, class, type, answer, anslen)
* copy without '.' if present.
*/
n = strlen(name) - 1;
if (n != (0 - 1) && name[n] == '.' && n < sizeof(nbuf) - 1) {
if (n != (0 - 1) && name[n] == '.'
&& n < (int) (sizeof(nbuf) - 1)) {
bcopy(name, nbuf, n);
nbuf[n] = '\0';
} else