Print this page
make: fix GCC warnings
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/make/bin/globals.cc
+++ new/usr/src/cmd/make/bin/globals.cc
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 *
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 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 /*
27 27 * globals.cc
28 28 *
29 29 * This declares all global variables
30 30 */
31 31
32 32 /*
33 33 * Included files
34 34 */
35 35 #include <nl_types.h>
36 36 #include <mk/defs.h>
37 37 #include <sys/stat.h>
38 38
39 39 /*
40 40 * Defined macros
41 41 */
42 42
43 43 /*
44 44 * typedefs & structs
45 45 */
46 46
47 47 /*
48 48 * Global variables used by make only
49 49 */
50 50 FILE *dependency_report_file;
51 51
52 52 /*
53 53 * Global variables used by make
54 54 */
55 55 Boolean allrules_read=false;
56 56 Name posix_name;
57 57 Name svr4_name;
58 58 Boolean sdot_target; /* used to identify s.m(/M)akefile */
59 59 Boolean all_parallel; /* TEAMWARE_MAKE_CMN */
60 60 Boolean assign_done;
61 61 int foo;
62 62 Boolean build_failed_seen;
63 63 #ifdef DISTRIBUTED
64 64 Boolean building_serial;
65 65 #endif
66 66 Name built_last_make_run;
67 67 Name c_at;
68 68 #ifdef DISTRIBUTED
69 69 Boolean called_make = false;
70 70 #endif
71 71 Boolean cleanup;
72 72 Boolean close_report;
73 73 Boolean command_changed;
74 74 Boolean commands_done;
75 75 Chain conditional_targets;
76 76 Name conditionals;
77 77 Boolean continue_after_error; /* `-k' */
78 78 Property current_line;
79 79 Name current_make_version;
80 80 Name current_target;
81 81 short debug_level;
82 82 Cmd_line default_rule;
83 83 Name default_rule_name;
84 84 Name default_target_to_build;
85 85 Name dmake_group;
86 86 Name dmake_max_jobs;
87 87 Name dmake_mode;
88 88 DMake_mode dmake_mode_type;
89 89 Name dmake_output_mode;
90 90 DMake_output_mode output_mode = txt1_mode;
91 91 Name dmake_odir;
92 92 Name dmake_rcfile;
93 93 Name done;
94 94 Name dot;
95 95 Name dot_keep_state;
96 96 Name dot_keep_state_file;
97 97 Name empty_name;
98 98 #if defined(HP_UX) || defined(linux)
99 99 int exit_status;
100 100 #endif
101 101 Boolean fatal_in_progress;
102 102 int file_number;
103 103 #if 0
104 104 Boolean filter_stderr; /* `-X' */
105 105 #endif
106 106 Name force;
107 107 Name ignore_name;
108 108 Boolean ignore_errors; /* `-i' */
109 109 Boolean ignore_errors_all; /* `-i' */
110 110 Name init;
111 111 int job_msg_id;
112 112 Boolean keep_state;
113 113 Name make_state;
114 114 #ifdef TEAMWARE_MAKE_CMN
115 115 timestruc_t make_state_before;
116 116 #endif
117 117 Dependency makefiles_used;
118 118 Name makeflags;
119 119 // Boolean make_state_locked; // Moved to lib/mksh
120 120 Name make_version;
121 121 char mbs_buffer2[(MAXPATHLEN * MB_LEN_MAX)];
122 122 char *mbs_ptr;
123 123 char *mbs_ptr2;
124 124 int mtool_msgs_fd;
125 125 Boolean depinfo_already_read = false;
126 126 #ifdef NSE
127 127 Name derived_src;
128 128 Boolean nse; /* NSE on */
129 129 Name nse_backquote_seen;
130 130 char nse_depinfo_lockfile[MAXPATHLEN];
131 131 Boolean nse_depinfo_locked;
132 132 Boolean nse_did_recursion;
133 133 Name nse_shell_var_used;
134 134 Boolean nse_watch_vars = false;
135 135 wchar_t current_makefile[MAXPATHLEN];
136 136 #endif
137 137 Boolean no_action_was_taken = true; /* true if we've not **
138 138 ** run any command */
139 139
140 140 Boolean no_parallel = false; /* TEAMWARE_MAKE_CMN */
141 141 #ifdef SGE_SUPPORT
142 142 Boolean grid = false; /* TEAMWARE_MAKE_CMN */
143 143 #endif
144 144 Name no_parallel_name;
145 145 Name not_auto;
146 146 Boolean only_parallel; /* TEAMWARE_MAKE_CMN */
147 147 Boolean parallel; /* TEAMWARE_MAKE_CMN */
148 148 Name parallel_name;
149 149 Name localhost_name;
150 150 int parallel_process_cnt;
151 151 Percent percent_list;
152 152 Dyntarget dyntarget_list;
153 153 Name plus;
154 154 Name pmake_machinesfile;
155 155 Name precious;
156 156 Name primary_makefile;
157 157 Boolean quest; /* `-q' */
158 158 short read_trace_level;
159 159 Boolean reading_dependencies = false;
160 160 Name recursive_name;
161 161 int recursion_level;
162 162 short report_dependencies_level = 0; /* -P */
163 163 Boolean report_pwd;
164 164 Boolean rewrite_statefile;
165 165 Running running_list;
166 166 char *sccs_dir_path;
167 167 Name sccs_get_name;
168 168 Name sccs_get_posix_name;
169 169 Cmd_line sccs_get_rule;
170 170 Cmd_line sccs_get_org_rule;
171 171 Cmd_line sccs_get_posix_rule;
172 172 Name get_name;
173 173 Cmd_line get_rule;
174 174 Name get_posix_name;
175 175 Cmd_line get_posix_rule;
176 176 Boolean send_mtool_msgs; /* `-K' */
177 177 Boolean all_precious;
178 178 Boolean silent_all; /* `-s' */
179 179 Boolean report_cwd; /* `-w' */
180 180 Boolean silent; /* `-s' */
181 181 Name silent_name;
↓ open down ↓ |
181 lines elided |
↑ open up ↑ |
182 182 char *stderr_file = NULL;
183 183 char *stdout_file = NULL;
184 184 #ifdef SGE_SUPPORT
185 185 char script_file[MAXPATHLEN] = "";
186 186 #endif
187 187 Boolean stdout_stderr_same;
188 188 Dependency suffixes;
189 189 Name suffixes_name;
190 190 Name sunpro_dependencies;
191 191 Boolean target_variants;
192 - char *tmpdir = NOCATGETS("/tmp");
193 - char *temp_file_directory = NOCATGETS(".");
192 + const char *tmpdir = NOCATGETS("/tmp");
193 + const char *temp_file_directory = NOCATGETS(".");
194 194 Name temp_file_name;
195 195 short temp_file_number;
196 196 time_t timing_start;
197 197 wchar_t *top_level_target;
198 198 Boolean touch; /* `-t' */
199 199 Boolean trace_reader; /* `-D' */
200 200 Boolean build_unconditional; /* `-u' */
201 201 pathpt vroot_path = VROOT_DEFAULT;
202 202 Name wait_name;
203 203 wchar_t wcs_buffer2[MAXPATHLEN];
204 204 wchar_t *wcs_ptr;
205 205 wchar_t *wcs_ptr2;
206 206 nl_catd catd;
207 207 long int hostid;
208 208
209 209 /*
210 210 * File table of contents
211 211 */
212 212
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX