Print this page
1926 libresolv evades compiler warnings

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libresolv/res_debug.c
          +++ new/usr/src/lib/libresolv/res_debug.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
       23 + * Copyright 2015 Gary Mills
  23   24   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  
  27   28  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  28   29  /*        All Rights Reserved   */
  29   30  
  30   31  /*
  31   32   * University Copyright- Copyright (c) 1982, 1986, 1988
  32   33   * The Regents of the University of California
  33   34   * All Rights Reserved
  34   35   *
  35   36   * University Acknowledgment- Portions of this document are derived from
  36   37   * software developed by the University of California, Berkeley, and its
  37   38   * contributors.
  38   39   */
  39   40  
  40      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  41      -
  42   41  #include <sys/types.h>
       42 +#include <sys/socket.h>
  43   43  #include <netinet/in.h>
       44 +#include <arpa/inet.h>
  44   45  #include <stdio.h>
       46 +#include <string.h>
  45   47  #include <arpa/nameser.h>
       48 +#include <resolv.h>
       49 +#include "crossl.h"
  46   50  
  47      -extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
  48      -extern char *inet_ntoa();
  49   51  void fp_query(char *msg, FILE *file);
  50   52  
  51   53  char *_res_opcodes[] = {
  52   54          "QUERY",
  53   55          "IQUERY",
  54   56          "CQUERYM",
  55   57          "CQUERYU",
  56   58          "4",
  57   59          "5",
  58   60          "6",
↓ open down ↓ 129 lines elided ↑ open up ↑
 188  190  }
 189  191  
 190  192  char *
 191  193  p_cdname(cp, msg, file)
 192  194          char *cp, *msg;
 193  195          FILE *file;
 194  196  {
 195  197          char name[MAXDNAME];
 196  198          int n;
 197  199  
 198      -        if ((n = dn_expand(msg, msg + 512, cp, name, sizeof (name))) < 0)
      200 +        if ((n = dn_expand((u_char *)msg, (u_char *)(msg + 512), (u_char *)cp,
      201 +            (u_char *)name, sizeof (name))) < 0)
 199  202                  return (NULL);
 200  203          if (name[0] == '\0') {
 201  204                  name[0] = '.';
 202  205                  name[1] = '\0';
 203  206          }
 204  207          fputs(name, file);
 205  208          return (cp + n);
 206  209  }
 207  210  
 208  211  /*
↓ open down ↓ 317 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX