From 7ce5e09d1b5d32a06ea7c9156676b039da26b0cb Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 21 Jun 2008 23:37:53 +0000 Subject: [PATCH] - protect DEBUG again because we should be able to set it from the Makefile - add a missing cast to pacify lint. --- lib/libc/resolv/res_init.c | 6 +++--- lib/libc/resolv/res_mkquery.c | 8 +++++--- lib/libc/resolv/res_query.c | 6 ++++-- lib/libc/resolv/res_send.c | 6 ++++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/libc/resolv/res_init.c b/lib/libc/resolv/res_init.c index 6345bf24a7c6..5e960b4ff9ec 100644 --- a/lib/libc/resolv/res_init.c +++ b/lib/libc/resolv/res_init.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_init.c,v 1.14 2008/06/21 20:41:48 christos Exp $ */ +/* $NetBSD: res_init.c,v 1.15 2008/06/21 23:37:53 christos Exp $ */ /* * Copyright (c) 1985, 1989, 1993 @@ -76,7 +76,7 @@ static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; static const char rcsid[] = "Id: res_init.c,v 1.23 2007/07/09 01:43:23 marka Exp"; #else -__RCSID("$NetBSD: res_init.c,v 1.14 2008/06/21 20:41:48 christos Exp $"); +__RCSID("$NetBSD: res_init.c,v 1.15 2008/06/21 23:37:53 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -120,9 +120,9 @@ __weak_alias(res_setservers,__res_setservers) #include "res_private.h" +#define RESOLVSORT /*% Options. Should all be left alone. */ #ifndef DEBUG -#define RESOLVSORT #define DEBUG #endif diff --git a/lib/libc/resolv/res_mkquery.c b/lib/libc/resolv/res_mkquery.c index a2ad807823f8..68a6a8776416 100644 --- a/lib/libc/resolv/res_mkquery.c +++ b/lib/libc/resolv/res_mkquery.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_mkquery.c,v 1.9 2008/06/21 20:41:48 christos Exp $ */ +/* $NetBSD: res_mkquery.c,v 1.10 2008/06/21 23:37:53 christos Exp $ */ /* * Copyright (c) 1985, 1993 @@ -76,7 +76,7 @@ static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93"; static const char rcsid[] = "Id: res_mkquery.c,v 1.6.672.1 2008/04/03 02:12:21 marka Exp"; #else -__RCSID("$NetBSD: res_mkquery.c,v 1.9 2008/06/21 20:41:48 christos Exp $"); +__RCSID("$NetBSD: res_mkquery.c,v 1.10 2008/06/21 23:37:53 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -101,7 +101,9 @@ __weak_alias(res_nopt,_res_nopt) #endif /* Options. Leave them on. */ +#ifndef DEBUG #define DEBUG +#endif extern const char *_res_opcodes[]; @@ -306,7 +308,7 @@ res_nopt_rdata(res_state statp, ns_put16(len, cp); cp += INT16SZ; - memcpy(cp, data, len); + (void)memcpy(cp, data, (size_t)len); cp += len; len = cp - rdata; diff --git a/lib/libc/resolv/res_query.c b/lib/libc/resolv/res_query.c index 5607bb3d5e67..2689f6919120 100644 --- a/lib/libc/resolv/res_query.c +++ b/lib/libc/resolv/res_query.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_query.c,v 1.10 2008/06/21 20:41:48 christos Exp $ */ +/* $NetBSD: res_query.c,v 1.11 2008/06/21 23:37:53 christos Exp $ */ /* * Copyright (c) 1988, 1993 @@ -76,7 +76,7 @@ static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; static const char rcsid[] = "Id: res_query.c,v 1.8.672.2 2008/04/03 10:49:22 marka Exp"; #else -__RCSID("$NetBSD: res_query.c,v 1.10 2008/06/21 20:41:48 christos Exp $"); +__RCSID("$NetBSD: res_query.c,v 1.11 2008/06/21 23:37:53 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -108,7 +108,9 @@ __weak_alias(res_hostalias,__res_hostalias) #endif /* Options. Leave them on. */ +#ifndef DEBUG #define DEBUG +#endif #if PACKETSZ > 1024 #define MAXPACKET PACKETSZ diff --git a/lib/libc/resolv/res_send.c b/lib/libc/resolv/res_send.c index 903b6da608c3..10e9ade63ac0 100644 --- a/lib/libc/resolv/res_send.c +++ b/lib/libc/resolv/res_send.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_send.c,v 1.14 2008/06/21 20:41:48 christos Exp $ */ +/* $NetBSD: res_send.c,v 1.15 2008/06/21 23:37:53 christos Exp $ */ /* * Copyright (c) 1985, 1989, 1993 @@ -76,7 +76,7 @@ static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; static const char rcsid[] = "Id: res_send.c,v 1.18.10.1 2008/01/27 02:06:46 marka Exp"; #else -__RCSID("$NetBSD: res_send.c,v 1.14 2008/06/21 20:41:48 christos Exp $"); +__RCSID("$NetBSD: res_send.c,v 1.15 2008/06/21 23:37:53 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -130,7 +130,9 @@ __weak_alias(res_nsend,__res_nsend) #endif /* USE_POLL */ /* Options. Leave them on. */ +#ifndef DEBUG #define DEBUG +#endif #include "res_debug.h" #include "res_private.h"