[rtems-libbsd commit] gethostbydns.c: dprintf conflicts with POSIX - rename to DPRINTF

Joel Sherrill joel at rtems.org
Wed Jul 11 22:34:32 UTC 2012


Module:    rtems-libbsd
Branch:    master
Commit:    a98a274dbe3eee9337fc21c263194bd521228ff1
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=a98a274dbe3eee9337fc21c263194bd521228ff1

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Wed Jul 11 17:36:34 2012 -0500

gethostbydns.c: dprintf conflicts with POSIX - rename to DPRINTF

This is done by the from-freebsd.sh script.

---

 freebsd-userspace/lib/libc/net/gethostbydns.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/freebsd-userspace/lib/libc/net/gethostbydns.c b/freebsd-userspace/lib/libc/net/gethostbydns.c
index 02853be..fa22fed 100644
--- a/freebsd-userspace/lib/libc/net/gethostbydns.c
+++ b/freebsd-userspace/lib/libc/net/gethostbydns.c
@@ -90,7 +90,7 @@ static void addrsort(char **, int, res_state);
 #endif
 
 #ifdef DEBUG
-static void dprintf(char *, int, res_state) __printflike(1, 0);
+static void DPRINTF(char *, int, res_state) __printflike(1, 0);
 #endif
 
 #define MAXPACKET	(64*1024)
@@ -109,7 +109,7 @@ int _dns_ttl_;
 
 #ifdef DEBUG
 static void
-dprintf(msg, num, res)
+DPRINTF(msg, num, res)
 	char *msg;
 	int num;
 	res_state res;
@@ -122,7 +122,7 @@ dprintf(msg, num, res)
 	}
 }
 #else
-# define dprintf(msg, num, res) /*nada*/
+# define DPRINTF(msg, num, res) /*nada*/
 #endif
 
 #define BOUNDED_INCR(x) \
@@ -375,13 +375,13 @@ gethostanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
 			bp += sizeof(align) - ((u_long)bp % sizeof(align));
 
 			if (bp + n >= ep) {
-				dprintf("size (%d) too big\n", n, statp);
+				DPRINTF("size (%d) too big\n", n, statp);
 				had_error++;
 				continue;
 			}
 			if (hap >= &hed->h_addr_ptrs[_MAXADDRS-1]) {
 				if (!toobig++)
-					dprintf("Too many addresses (%d)\n",
+					DPRINTF("Too many addresses (%d)\n",
 						_MAXADDRS, statp);
 				cp += n;
 				continue;
@@ -395,7 +395,7 @@ gethostanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
 			}
 			break;
 		default:
-			dprintf("Impossible condition (type=%d)\n", type,
+			DPRINTF("Impossible condition (type=%d)\n", type,
 			    statp);
 			RES_SET_H_ERRNO(statp, NO_RECOVERY);
 			return (-1);
@@ -522,12 +522,12 @@ _dns_gethostbyname(void *rval, void *cb_data, va_list ap)
 	n = res_nsearch(statp, name, C_IN, type, buf->buf, sizeof(buf->buf));
 	if (n < 0) {
 		free(buf);
-		dprintf("res_nsearch failed (%d)\n", n, statp);
+		DPRINTF("res_nsearch failed (%d)\n", n, statp);
 		*h_errnop = statp->res_h_errno;
 		return (NS_NOTFOUND);
 	} else if (n > sizeof(buf->buf)) {
 		free(buf);
-		dprintf("static buffer is too small (%d)\n", n, statp);
+		DPRINTF("static buffer is too small (%d)\n", n, statp);
 		*h_errnop = statp->res_h_errno;
 		return (NS_UNAVAIL);
 	}
@@ -629,13 +629,13 @@ _dns_gethostbyaddr(void *rval, void *cb_data, va_list ap)
 	    sizeof buf->buf);
 	if (n < 0) {
 		free(buf);
-		dprintf("res_nquery failed (%d)\n", n, statp);
+		DPRINTF("res_nquery failed (%d)\n", n, statp);
 		*h_errnop = statp->res_h_errno;
 		return (NS_UNAVAIL);
 	}
 	if (n > sizeof buf->buf) {
 		free(buf);
-		dprintf("static buffer is too small (%d)\n", n, statp);
+		DPRINTF("static buffer is too small (%d)\n", n, statp);
 		*h_errnop = statp->res_h_errno;
 		return (NS_UNAVAIL);
 	}




More information about the vc mailing list