Print this page
rpcgen should only produce ANSI code
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/rpcgen/rpc_util.h
+++ new/usr/src/cmd/rpcgen/rpc_util.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
↓ 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 *
33 35 * University Acknowledgment- Portions of this document are derived from
34 36 * software developed by the University of California, Berkeley, and its
35 37 * contributors.
36 38 */
37 39
38 40 #ifndef _RPC_UTIL_H
39 41 #define _RPC_UTIL_H
40 42
41 43 #include <sys/types.h>
42 44 #include <stdlib.h>
43 45 #include "rpc_scan.h"
44 46
45 47 #ifdef __cplusplus
46 48 extern "C" {
47 49 #endif
48 50
49 51 /*
50 52 * rpc_util.h, Useful definitions for the RPC protocol compiler
51 53 */
52 54
53 55
54 56 /* Current version number of rpcgen. */
55 57 #define RPCGEN_MAJOR 1
56 58 #define RPCGEN_MINOR 1
57 59
58 60 #define f_print (void) fprintf
59 61
60 62 struct list {
61 63 definition *val;
62 64 struct list *next;
63 65 };
64 66 typedef struct list list;
65 67
66 68 struct xdrfunc {
67 69 char *name;
68 70 int pointerp;
69 71 struct xdrfunc *next;
70 72 };
71 73 typedef struct xdrfunc xdrfunc;
72 74
73 75 struct commandline {
74 76 int cflag; /* xdr C routines */
75 77 int hflag; /* header file */
76 78 int lflag; /* client side stubs */
77 79 int mflag; /* server side stubs */
78 80 int nflag; /* netid flag */
79 81 int sflag; /* server stubs for the given transport */
80 82 int tflag; /* dispatch Table file */
81 83 int Ssflag; /* produce server sample code */
82 84 int Scflag; /* produce client sample code */
83 85 int makefileflag; /* Generate a template Makefile */
84 86 char *infile; /* input module name */
85 87 char *outfile; /* output module name */
86 88 };
87 89
88 90 #define PUT 1
89 91 #define GET 2
90 92
91 93 /*
92 94 * Global variables
93 95 */
94 96 #define MAXLINESIZE 1024
95 97 extern char curline[MAXLINESIZE];
96 98 extern char *where;
97 99 extern int linenum;
98 100
99 101 extern char *infilename;
100 102 extern FILE *fout;
101 103 extern FILE *fin;
102 104
103 105 extern list *defined;
104 106
105 107 extern bas_type *typ_list_h;
106 108 extern bas_type *typ_list_t;
↓ open down ↓ |
74 lines elided |
↑ open up ↑ |
107 109 extern xdrfunc *xdrfunc_head, *xdrfunc_tail;
108 110
109 111 /*
110 112 * All the option flags
111 113 */
112 114 extern int inetdflag;
113 115 extern int pmflag;
114 116 extern int tblflag;
115 117 extern int logflag;
116 118 extern int newstyle;
117 -extern int Cflag; /* ANSI-C/C++ flag */
118 119 extern int CCflag; /* C++ flag */
119 120 extern int tirpcflag; /* flag for generating tirpc code */
120 121 extern int inlinelen; /* if this is 0, then do not generate inline code */
121 122 extern int mtflag;
122 123 extern int mtauto;
123 124 extern int rflag;
124 125
125 126 /*
126 127 * Other flags related with inetd jumpstart.
127 128 */
128 129 extern int indefinitewait;
129 130 extern int exitnow;
130 131 extern int timerflag;
131 132
132 133 extern int nonfatalerrors;
133 134
134 135 extern pid_t childpid;
135 136
136 137 /*
137 138 * rpc_util routines
138 139 */
139 140 extern void storeval(list **, definition *);
140 141
141 142 #define STOREVAL(list, item) \
142 143 storeval(list, item)
143 144
144 145 extern definition *findval(list *, char *, int (*)());
145 146
146 147 #define FINDVAL(list, item, finder) \
147 148 findval(list, item, finder)
148 149
149 150 extern char *fixtype(char *);
150 151 extern char *stringfix(char *);
151 152 extern char *locase(char *);
152 153 extern void pvname_svc(char *, char *);
153 154 extern void pvname(char *, char *);
154 155 extern void ptype(char *, char *, int);
155 156 extern int isvectordef(char *, relation);
156 157 extern int streq(char *, char *);
157 158 extern void error(char *);
158 159 extern void expected1(tok_kind);
159 160 extern void expected2(tok_kind, tok_kind);
160 161 extern void expected3(tok_kind, tok_kind, tok_kind);
161 162 extern void tabify(FILE *, int);
162 163 extern void record_open(char *);
163 164 extern bas_type *find_type(char *);
164 165
↓ open down ↓ |
37 lines elided |
↑ open up ↑ |
165 166 /*
166 167 * rpc_cout routines
167 168 */
168 169 extern void emit(definition *);
169 170
170 171 /*
171 172 * rpc_hout routines
172 173 */
173 174 extern void print_datadef(definition *);
174 175 extern void print_funcdef(definition *);
175 -extern void print_xdr_func_def(char *, int, int);
176 +extern void print_xdr_func_def(char *, int);
176 177
177 178 /*
178 179 * rpc_svcout routines
179 180 */
180 181 extern void write_most(char *, int, int);
181 182 extern void write_rest(void);
182 183 extern void write_inetd_register(char *);
183 184 extern void write_netid_register(char *);
184 185 extern void write_nettype_register(char *);
185 186
186 187 /*
187 188 * rpc_clntout routines
188 189 */
189 190 extern void write_stubs(void);
190 191
191 192 /*
192 193 * rpc_tblout routines
193 194 */
194 195 extern void write_tables(void);
195 196
196 197 #ifdef __cplusplus
197 198 }
198 199 #endif
199 200
200 201 #endif /* !_RPC_UTIL_H */
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX