Print this page
rpcgen should only produce ANSI code

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/rpcgen/rpc_cout.c
          +++ new/usr/src/cmd/rpcgen/rpc_cout.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 2014 Garrett D'Amore <garrett@damore.org>
       24 + *
  23   25   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26   28  /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  27   29  /* All Rights Reserved */
  28   30  /*
  29   31   * University Copyright- Copyright (c) 1982, 1986, 1988
  30   32   * The Regents of the University of California
  31   33   * All Rights Reserved
  32   34   *
↓ open down ↓ 86 lines elided ↑ open up ↑
 119  121          def = (definition *)FINDVAL(defined, type, findtype);
 120  122          return (def == NULL);
 121  123  }
 122  124  
 123  125  
 124  126  static void
 125  127  print_generic_header(char *procname, int pointerp)
 126  128  {
 127  129          f_print(fout, "\n");
 128  130          f_print(fout, "bool_t\n");
 129      -        if (Cflag) {
 130      -                f_print(fout, "xdr_%s(", procname);
 131      -                f_print(fout, "XDR *xdrs, ");
 132      -                f_print(fout, "%s ", procname);
 133      -                if (pointerp)
 134      -                        f_print(fout, "*");
 135      -                f_print(fout, "objp)\n{\n\n");
 136      -        } else {
 137      -                f_print(fout, "xdr_%s(xdrs, objp)\n", procname);
 138      -                f_print(fout, "\tXDR *xdrs;\n");
 139      -                f_print(fout, "\t%s ", procname);
 140      -                if (pointerp)
 141      -                        f_print(fout, "*");
 142      -                f_print(fout, "objp;\n{\n\n");
 143      -        }
      131 +        f_print(fout, "xdr_%s(", procname);
      132 +        f_print(fout, "XDR *xdrs, ");
      133 +        f_print(fout, "%s ", procname);
      134 +        if (pointerp)
      135 +                f_print(fout, "*");
      136 +        f_print(fout, "objp)\n{\n\n");
 144  137  }
 145  138  
 146  139  static void
 147  140  print_header(definition *def)
 148  141  {
 149  142          print_generic_header(def->def_name,
 150  143              def->def_kind != DEF_TYPEDEF ||
 151  144              !isvectordef(def->def.ty.old_type, def->def.ty.rel));
 152  145          /* Now add Inline support */
 153  146  
↓ open down ↓ 755 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX