]> sourceware.org Git - glibc.git/commitdiff
resolv: Deprecate unimplemented flags
authorFlorian Weimer <fweimer@redhat.com>
Fri, 7 Oct 2016 15:41:45 +0000 (17:41 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 7 Oct 2016 15:41:45 +0000 (17:41 +0200)
RES_AAONLY, RES_PRIMARY, RES_NOCHECKNAME, RES_KEEPTSIG result
in compile-time warnings.  Some of these flags are still used in
applications.

ChangeLog
NEWS
misc/sys/cdefs.h
resolv/res_debug.c
resolv/res_init.c
resolv/resolv.h

index 549acfdba48831e0a2ba401d14e656a41856dd51..942f9e02ecb8ef71c4a441af0ae197bae523f378 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-10-07  Florian Weimer  <fweimer@redhat.com>
+
+       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.
+
 2016-10-07  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
        * nptl/pt-longjmp.c (DEFINE_LONGJMP): Use libc_ifunc macro.
diff --git a/NEWS b/NEWS
index b077d0a0782f7f5704302f8f19a2d6ddee9d12d5..be66f2308cb01685865847e07e956a8f572651a7 100644 (file)
--- 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 <resolv.h> header file have been deprecated.  They were already
+  unimplemented.
+
 * DNSSEC-related declarations and definitions have been removed from the
   <arpa/nameser.h> header file, and libresolv will no longer attempt to
   decode the data part of DNSSEC record types.  Previous versions of glibc
index 935a94b4663cd07c86d7367d3c7d0e67b2e7c7f5..50e00e67114835cfe40c6557cafbc6eaa7ea7e56 100644 (file)
 # 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 */
index 9b33e1949744722f3e900fc4d87b2c552df3ef12..825e8a65985c7eff7a6550cc1a588be2bda60fc3 100644 (file)
@@ -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";
index 0a01fd56db6f5b125c98a4e6a42c932c3d9f8706..1cfa4e6da96460b9eec91ef60f3f5d702c84ff84 100644 (file)
@@ -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 },
index 58c3c38743be0ecaa8bc261b5b1785d73ad36976..9146258bd4fd66de54281fb471fd27a8b5d3ba14 100644 (file)
@@ -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 */
This page took 0.171931 seconds and 5 git commands to generate.