From patchwork Fri Oct 7 15:47:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 679444 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3srDSQ56rpz9vHY for ; Sat, 8 Oct 2016 02:48:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=cVI6SnYi; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; q=dns; s=default; b= VVdGlrwUtwLV7UD1Rtz+h2CQPwEjnwYGPXkOSW+WKO8jK8+xrAQeGgrxbN5ardyA 4vZFdUN1Yt5quglEoXFdute5z1C3gi9kf+q5KRyt78m1g4Ufn41W86EgjfH7GXsD v8ITy257U4FrwPP99tHw2REsMoMhui5fca6iTSIN3kQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; s=default; bh=7Cm9vY VV5LYHYJe8QCOKNIflHE0=; b=cVI6SnYijpuf5rhTUfa5LqRBye98mL48IgZaV3 w7ekgnwHsYh+CaW7SB/Hd0R6bYxskTGcYEj5Ct7CF97J+ddrntRBJOB33fYh16w+ IGs0fdEyzJUhlCcZFbxjQiR5VrPa0TvjtoEa8/n7AO9nF2YshJJ2S69GLB/tHrJ1 qWb8k= Received: (qmail 56454 invoked by alias); 7 Oct 2016 15:47:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 56390 invoked by uid 89); 7 Oct 2016 15:47:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=predates, answers, 2.4.22, COMMITTED X-HELO: mx1.redhat.com Date: Fri, 07 Oct 2016 17:47:53 +0200 To: libc-alpha@sourceware.org Subject: [PATCH COMMITTED] resolv: Deprecate unimplemented flags User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20161007154753.081AD4126BF46@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) RES_AAONLY, RES_PRIMARY, RES_NOCHECKNAME, RES_KEEPTSIG result in compile-time warnings. Some of these flags are still used in applications. 2016-10-07 Florian Weimer resolv: Deprecate unimplemented flags. * misc/sys/cdefs.h (__glibc_macro_warning1) (__glibc_macro_warning): Define. * resolv/resolv.h (RES_AAONLY, RES_PRIMARY, RES_NOCHECKNAME) (RES_KEEPTSIG): Mark as deprecated. * resolv/res_debug.c (p_option): Remove RES_AAONLY, RES_PRIMARY, RES_NOCHECKNAME, RES_KEEPTSIG. * resolv/res_init.c (res_setoptions): Remove RES_NOCHECKNAME handling. diff --git a/NEWS b/NEWS index b077d0a..be66f23 100644 --- a/NEWS +++ b/NEWS @@ -59,6 +59,10 @@ Version 2.25 for the Linux quota interface which predates kernel version 2.4.22 has been removed. +* The flags RES_AAONLY, RES_PRIMARY, RES_NOCHECKNAME, RES_KEEPTSIG defined + in the header file have been deprecated. They were already + unimplemented. + * DNSSEC-related declarations and definitions have been removed from the header file, and libresolv will no longer attempt to decode the data part of DNSSEC record types. Previous versions of glibc diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 935a94b..50e00e6 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -472,4 +472,14 @@ # endif #endif +/* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is + intended for use in preprocessor macros. */ +#if __GNUC_PREREQ (4,8) +# define __glibc_macro_warning1(message) _Pragma (#message) +# define __glibc_macro_warning(message) \ + __glibc_macro_warning1 (GCC warning message) +#else +# define __glibc_macro_warning(msg) +#endif + #endif /* sys/cdefs.h */ diff --git a/resolv/res_debug.c b/resolv/res_debug.c index 9b33e19..825e8a6 100644 --- a/resolv/res_debug.c +++ b/resolv/res_debug.c @@ -546,9 +546,7 @@ p_option(u_long option) { switch (option) { case RES_INIT: return "init"; case RES_DEBUG: return "debug"; - case RES_AAONLY: return "aaonly(unimpl)"; case RES_USEVC: return "use-vc"; - case RES_PRIMARY: return "primry(unimpl)"; case RES_IGNTC: return "igntc"; case RES_RECURSE: return "recurs"; case RES_DEFNAMES: return "defnam"; @@ -559,8 +557,6 @@ p_option(u_long option) { case RES_NOALIASES: return "noaliases"; case RES_USE_INET6: return "inet6"; case RES_ROTATE: return "rotate"; - case RES_NOCHECKNAME: return "no-check-names(unimpl)"; - case RES_KEEPTSIG: return "keeptsig(unimpl)"; case RES_BLAST: return "blast"; case RES_USEBSTRING: return "ip6-bytestring"; case RES_NOIP6DOTINT: return "no-ip6-dotint"; diff --git a/resolv/res_init.c b/resolv/res_init.c index 0a01fd5..1cfa4e6 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -442,7 +442,6 @@ res_setoptions(res_state statp, const char *options, const char *source) { { STRnLEN ("no-ip6-dotint"), 0, RES_NOIP6DOTINT }, { STRnLEN ("ip6-dotint"), 1, ~RES_NOIP6DOTINT }, { STRnLEN ("rotate"), 0, RES_ROTATE }, - { STRnLEN ("no-check-names"), 0, RES_NOCHECKNAME }, { STRnLEN ("edns0"), 0, RES_USE_EDNS0 }, { STRnLEN ("single-request-reopen"), 0, RES_SNGLKUPREOP }, { STRnLEN ("single-request"), 0, RES_SNGLKUP }, diff --git a/resolv/resolv.h b/resolv/resolv.h index 58c3c38..9146258 100644 --- a/resolv/resolv.h +++ b/resolv/resolv.h @@ -177,9 +177,11 @@ struct res_sym { */ #define RES_INIT 0x00000001 /* address initialized */ #define RES_DEBUG 0x00000002 /* print debug messages */ -#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/ +#define RES_AAONLY \ + __glibc_macro_warning ("RES_AAONLY is deprecated") 0x00000004 #define RES_USEVC 0x00000008 /* use virtual circuit */ -#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */ +#define RES_PRIMARY \ + __glibc_macro_warning ("RES_PRIMARY is deprecated") 0x00000010 #define RES_IGNTC 0x00000020 /* ignore trucation errors */ #define RES_RECURSE 0x00000040 /* recursion desired */ #define RES_DEFNAMES 0x00000080 /* use default domain name */ @@ -190,8 +192,10 @@ struct res_sym { #define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */ #define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */ #define RES_ROTATE 0x00004000 /* rotate ns list after each query */ -#define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity (!IMPL) */ -#define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */ +#define RES_NOCHECKNAME \ + __glibc_macro_warning ("RES_NOCHECKNAME is deprecated") 0x00008000 +#define RES_KEEPTSIG \ + __glibc_macro_warning ("RES_KEEPTSIG is deprecated") 0x00010000 #define RES_BLAST 0x00020000 /* blast all recursive servers */ #define RES_USEBSTRING 0x00040000 /* IPv6 reverse lookup with byte strings */