2019-02-18 Florian Weimer <fweimer@redhat.com>
+ * resolv/compat-gethnamaddr.c (Dprintf): Remove definition.
+ (getanswer): Do not call Dprintf.
+ (res_gethostbyname2_context): Likewise.
+ (res_gethostbyaddr_context): Likewise.
+
+2019-02-18 Florian Weimer <fweimer@redhat.com>
+
* libio/libio.h (_IO_stdin, _IO_stdout, _IO_stderr): Remove
declaration.
* libio/stdio.c (AL, AL2, _IO_stdin, _IO_stdout, _IO_stderr):
extern int h_errno;
# endif
-# ifdef DEBUG
-static void
-Dprintf (char *msg, int num)
-{
- if (_res.options & RES_DEBUG) {
- int save = errno;
-
- printf(msg, num);
- __set_errno (save);
- }
-}
-# else
-# define Dprintf(msg, num) /*nada*/
-# endif
-
# define BOUNDED_INCR(x) \
do { \
cp += x; \
char *bp, **ap, **hap;
int type, class, buflen, ancount, qdcount;
int haveanswer, had_error;
- int toobig = 0;
char tbuf[MAXDNAME];
const char *tname;
int (*name_ok) (const char *);
bp += sizeof(align) - ((u_long)bp % sizeof(align));
if (bp + n >= &hostbuf[sizeof hostbuf]) {
- Dprintf("size (%d) too big\n", n);
had_error++;
continue;
}
if (hap >= &h_addr_ptrs[MAXADDRS-1]) {
- if (!toobig++) {
- Dprintf("Too many addresses (%d)\n",
- MAXADDRS);
- }
cp += n;
continue;
}
&buf.ptr, NULL, NULL, NULL, NULL)) < 0) {
if (buf.buf != origbuf)
free (buf.buf);
- Dprintf("res_nsearch failed (%d)\n", n);
if (errno == ECONNREFUSED)
return (_gethtbyname2(name, af));
return (NULL);
if (n < 0) {
if (buf.buf != orig_buf)
free (buf.buf);
- Dprintf("res_nquery failed (%d)\n", n);
if (errno == ECONNREFUSED)
return (_gethtbyaddr(addr, len, af));
return (NULL);