2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/net/gethostbydns.c (dprintf): Rename to dbgprintf to prevent conflict with new dprintf function.
This commit is contained in:
parent
1012585f1f
commit
4d57c1edc7
|
@ -1,3 +1,8 @@
|
||||||
|
2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
|
* libc/sys/linux/net/gethostbydns.c (dprintf): Rename to
|
||||||
|
dbgprintf to prevent conflict with new dprintf function.
|
||||||
|
|
||||||
2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
|
2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix up "inf" and
|
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix up "inf" and
|
||||||
|
|
|
@ -94,7 +94,7 @@ u_int32_t _getlong(const u_char *src);
|
||||||
u_int16_t _getshort(const u_char *src);
|
u_int16_t _getshort(const u_char *src);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static void dprintf(char *, int);
|
static void dbgprintf(char *, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PACKETSZ > 1024
|
#if PACKETSZ > 1024
|
||||||
|
@ -118,7 +118,7 @@ int _dns_ttl_;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static void
|
static void
|
||||||
dprintf(msg, num)
|
dbgprintf(msg, num)
|
||||||
char *msg;
|
char *msg;
|
||||||
int num;
|
int num;
|
||||||
{
|
{
|
||||||
|
@ -130,7 +130,7 @@ dprintf(msg, num)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define dprintf(msg, num) /*nada*/
|
# define dbgprintf(msg, num) /*nada*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BOUNDED_INCR(x) \
|
#define BOUNDED_INCR(x) \
|
||||||
|
@ -397,13 +397,13 @@ gethostanswer(answer, anslen, qname, qtype, host, hostbuf, hostbuflen, herr)
|
||||||
bp += sizeof(align) - ((u_long)bp % sizeof(align));
|
bp += sizeof(align) - ((u_long)bp % sizeof(align));
|
||||||
|
|
||||||
if (bp + n >= &hostbuf[hostbuflen]) {
|
if (bp + n >= &hostbuf[hostbuflen]) {
|
||||||
dprintf("size (%d) too big\n", n);
|
dbgprintf("size (%d) too big\n", n);
|
||||||
had_error++;
|
had_error++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (hap >= &host->__host_addrs[MAXADDRS-1]) {
|
if (hap >= &host->__host_addrs[MAXADDRS-1]) {
|
||||||
if (!toobig++)
|
if (!toobig++)
|
||||||
dprintf("Too many addresses (%d)\n",
|
dbgprintf("Too many addresses (%d)\n",
|
||||||
MAXADDRS);
|
MAXADDRS);
|
||||||
cp += n;
|
cp += n;
|
||||||
continue;
|
continue;
|
||||||
|
@ -418,7 +418,7 @@ gethostanswer(answer, anslen, qname, qtype, host, hostbuf, hostbuflen, herr)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dprintf("Impossible condition (type=%d)\n", type);
|
dbgprintf("Impossible condition (type=%d)\n", type);
|
||||||
*herr = NO_RECOVERY;
|
*herr = NO_RECOVERY;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
/* BIND has abort() here, too risky on bad data */
|
/* BIND has abort() here, too risky on bad data */
|
||||||
|
@ -606,7 +606,7 @@ _dns_gethostbyname(void *rval, void *cb_data, va_list ap)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf))) < 0) {
|
if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf))) < 0) {
|
||||||
dprintf("res_search failed (%d)\n", n);
|
dbgprintf("res_search failed (%d)\n", n);
|
||||||
return NS_UNAVAIL;
|
return NS_UNAVAIL;
|
||||||
}
|
}
|
||||||
*(struct hostent **)rval = gethostanswer(&buf, n, name, type, resultbuf, hostbuf, buflen, herr);
|
*(struct hostent **)rval = gethostanswer(&buf, n, name, type, resultbuf, hostbuf, buflen, herr);
|
||||||
|
@ -697,11 +697,11 @@ _dns_gethostbyaddr(void *rval, void *cb_data, va_list ap)
|
||||||
}
|
}
|
||||||
n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
|
n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
dprintf("res_query failed (%d)\n", n);
|
dbgprintf("res_query failed (%d)\n", n);
|
||||||
return NS_UNAVAIL;
|
return NS_UNAVAIL;
|
||||||
}
|
}
|
||||||
if (n > sizeof buf.buf) {
|
if (n > sizeof buf.buf) {
|
||||||
dprintf("static buffer is too small (%d)\n", n);
|
dbgprintf("static buffer is too small (%d)\n", n);
|
||||||
return NS_UNAVAIL;
|
return NS_UNAVAIL;
|
||||||
}
|
}
|
||||||
if (!(hp = gethostanswer(&buf, n, qbuf, T_PTR, resultbuf, hostbuf, buflen, herr)))
|
if (!(hp = gethostanswer(&buf, n, qbuf, T_PTR, resultbuf, hostbuf, buflen, herr)))
|
||||||
|
|
Loading…
Reference in New Issue